'glib.h' file not found on Max OSX 10.9 - macos

I'm trying to compile msg2pdf which is a tool to convert messages in mu4e (mu for Emacs) to pdf.
I'm receiving the following error :
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in .
CC msg2pdf.o
In file included from msg2pdf.c:20:
In file included from ../../lib/mu-msg.h:24:
../../lib/mu-flags.h:24:10: fatal error: 'glib.h' file not found
#include <glib.h>
^
1 error generated.
make[2]: *** [msg2pdf.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Oddly, I checked the Makefile and GLIB_CFLAGS seem to be pointing on the right folder (where brew installed it).
In fact, glib.h is located in /usr/local/Cellar/glib/2.40.0_1/include/glib-2.0.
GLIB_CFLAGS = -D_REENTRANT -I/usr/local/Cellar/glib/2.40.0_1/include/glib-2.0 -I/usr/local/Cellar/glib/2.40.0_1/lib/glib-2.0/include -I/usr/local/opt/gettext/include
GLIB_LIBS = -L/usr/local/Cellar/glib/2.40.0_1/lib -L/usr/local/opt/gettext/lib -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
How can I succeed compiling the file? Is there any command line "hack" I can use while calling
make?
Edit
Here are the files in the directory
https://github.com/flexdec/temp
Edit 2
This is the output when using make V=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in .
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../lib -DICONDIR='""' -Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -g -O2 -MT msg2pdf.o -MD -MP -MF .deps/msg2pdf.Tpo -c -o msg2pdf.o msg2pdf.c
In file included from msg2pdf.c:20:
In file included from ../../lib/mu-msg.h:24:
../../lib/mu-flags.h:24:10: fatal error: 'glib.h' file not found
#include <glib.h>
^
1 error generated.
make[2]: *** [msg2pdf.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Edit 3
The new error I get using make V=1 now that GLIB_CFLAGS issue is fixed
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in .
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../lib -D_REENTRANT -I/usr/local/Cellar/glib/2.40.0_1/include/glib-2.0 -I/usr/local/Cellar/glib/2.40.0_1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -DICONDIR='""' -Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -g -O2 -MT msg2pdf.o -MD -MP -MF .deps/msg2pdf.Tpo -c -o msg2pdf.o msg2pdf.c
msg2pdf.c:24:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>
^
1 error generated.
make[2]: *** [msg2pdf.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

make V=1 instead of make will tell you what the C compiler command looks like (instead of just "CC msg2pdf.o")—check that and make sure it includes the flags you need.
Based on a quick look at your Makefile.am, you are including $(GTK_CFLAGS) and $(WEBKIT_CFLAGS) in your AM_CPPFLAGS but not $(GLIB_CFLAGS).

You need to run ./configure in mu's top-level directory on the machine where you want to compile it. configure will tell you about any missing dependencies. Optional components (such as msg2pdf) are skipped if their dependencies are not there.
Then, after configure succeeds, do a 'make'.
In any case, if configure has run successfully, the top-level 'make' should succeed as well (that's why we have configure!), otherwise please file a bug.

Related

Error Compiling pidgin on windows

Good day, I have been trying to compile pidgin on Windows 8 for some time now. I have been able to download all necessary files and put them in the correct folders, but when I attempt to use
$ make -f Makefile.mingw install
I get the following:
$ make -f Makefile.mingw install
make -C ../pidgin -f Makefile.mingw pidgin.dll
make[1]: Entering directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/pidgin'
make -C ../libpurple -f Makefile.mingw libpurple.dll
make[2]: Entering directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/libpurple'
gcc.exe -O2 -Wall -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -Wstack-protector -fwrapv -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security -fstack-protector-all --param ssp-buffer-size=1 -pipe -mms-bitfields -g -DHAVE_CYRUS_SASL -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN -I../libpurple -I../libpurple/win32 -I.. -I../../win32-dev/gtk_2_0-2.14/include -I../../win32-dev/gtk_2_0-2.14/include/glib-2.0 -I../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/include -I../../win32-dev/libxml2-2.9.0/include/libxml2 -o account.o -c account.c
In file included from account.c:26:0:
internal.h:128:18: fatal error: glib.h: No such file or directory
#include <glib.h>
^
compilation terminated.
../libpurple/win32/rules.mak:4: recipe for target 'account.o' failed
make[2]: *** [account.o] Error 1
make[2]: Leaving directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/libpurple'
../libpurple/win32/targets.mak:31: recipe for target '../libpurple/libpurple.dll.a' failed
make[1]: *** [../libpurple/libpurple.dll.a] Error 2
make[1]: Leaving directory '/cygdrive/c/PidginBuild/pidgin-2.10.11/pidgin'
../libpurple/win32/targets.mak:37: recipe for target '../pidgin/pidgin.dll.a' failed
make: *** [../pidgin/pidgin.dll.a] Error 2
Does anyone know how I can solve this? I've tried performing searches but I can't find anything.
You've apparently been at this for several days:
Error Compiling pidgin on windows
https://stackoverflow.com/questions/33667459/trouble-compiling-pidgin-on-windows
https://stackoverflow.com/questions/33695459/microsoft-manifest-tool-must-be-included-in-your-path
cygwin: cannot determine mount points
Q: Have you got it working yet?
If not, please look here:
https://developer.pidgin.im/wiki/BuildingWinPidgin
https://developer.pidgin.im/wiki/BuildingWinPidgin/3.0.0

make[ ]: *** [ ] Error 1

I am trying to compile a file on gcc and my 'make' command seems to throw an error.
Rishabhs-MacBook-Pro:binutils-2.20.1 Rishabh$ make
make[3]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
Making info in doc
make chew
make[4]: `chew' is up to date.
./chew -f ./doc.str <./../opncls.c >opncls.tmp
/bin/sh ./../../move-if-change opncls.tmp opncls.texi
Making info in po
...
...
make[4]: Nothing to be done for `all'.
gcc -DHAVE_CONFIG_H -I. -I. -I. -I../bfd -I./../bfd -I./../include - DLOCALEDIR="\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -MT strings.o -MD -MP -MF .deps/strings.Tpo -c -o strings.o strings.c
cc1: warnings being treated as errors
strings.c: In function ‘strings_file’:
strings.c:419: warning: ‘stat64’ is deprecated (declared at /usr/include/sys/stat.h:466)
make[4]: *** [strings.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2
I think the problem could be with the gcc but I can't seem to get around the problem. Any help would be appreciated.
You have the -Werror flag on the gcc command line. As the output says:
cc1: warnings being treated as errors
So either change your makefile not to include this or fix the stat64 is deprecated warning in strings.c!

GCC compiling error: conflicts with the other architecture options, which specify a mips1 processor

Im trying to cross-compile valgrind for MIPS architecture but im getting errors.
$ make
make all-recursive
make[1]: Entering directory `/valgrind-3.9.0'
Making all in include
make[2]: Entering directory `/valgrind-3.9.0/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/valgrind-3.9.0/include'
Making all in VEX
make[2]: Entering directory `/valgrind-3.9.0/VEX'
make all-am
make[3]: Entering directory `/valgrind-3.9.0/VEX'
/toolchain/rsdk-1.5.6-5281-EB-2.6.30-0.9.30.3-110915/bin/rsdk-linux-gcc - DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_mips32=1 -DVGO_linux=1 -DVGP_mips32_linux=1 -DVGPV_mips32_linux_vanilla=1 -Ipriv -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -mips32 -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing -Wno-long-long -Wwrite-strings -fno-stack-protector -MT priv/libvex_mips32_linux_a-main_globals.o -MD -MP -MF priv/.deps/libvex_mips32_linux_a-main_globals.Tpo -c -o priv/libvex_mips32_linux_a-main_globals.o `test -f 'priv/main_globals.c' || echo './'`priv/main_globals.c
priv/main_globals.c:1: error: '-mips32' conflicts with the other architecture options, which specify a mips1 processor
make[3]: *** [priv/libvex_mips32_linux_a-main_globals.o] Error 1
make[3]: Leaving directory `/valgrind-3.9.0/VEX'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/valgrind-3.9.0/VEX'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/valgrind-3.9.0'
make: *** [all] Error 2
I dont know if there is a problem with -mips32 argument but if i remove it i get error with 'opcodes not supported' later. Im not sure if this error complains about incompability issue.
I land up with the same issue and below is the solution. Change -march=mips32 to --march=mips32r2. I have used my build script something like -
if [[ "$PATH" == *"/usr/local/mips-2012.09/bin"* ]]; then
echo codesourcery toolchain path is already in PATH var
else
export PATH="/usr/local/mips-2012.09/bin:$PATH"
echo added codesourcery toolchain path to PATH var
fi
export AR=mips-linux-gnu-ar
export CC='mips-linux-gnu-gcc -EL'
export CXX='mips-linux-gnu-g++ -EL'
export LINK='mips-linux-gnu-g++ -EL'
export RANLIB=mips-linux-gnu-ranlib
export CFLAGS='-march=mips32r2'
export CCFLAGS='-march=mips32r2'
export CXXFLAGS='-march=mips32r2'
Happy Coding :-)

Beaglebone: gcc include path error while trying to build using 'make'

I am trying to build cmu pocketsphinx on my beaglebone black for speech recognition. I have downloaded the source code for sphinxbase and ran ./configure. Now, when I run 'make' I get the following errors:
Making all in src
make[1]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src'
Making all in libsphinxbase
make[2]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
Making all in util
make[3]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
/bin/sh ../../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/sphinxbase -I../../../include -I../../../include -I/usr/include/python2.7 -I/usr/include/python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps/bitvec.Tpo -c -o bitvec.lo bitvec.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/sphinxbase -I../../../include -I../../../include "-I/usr/include/python2.7" -I/usr/include/python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps/bitvec.Tpo -c bitvec.c -fPIC -DPIC -o .libs/bitvec.o
gcc: error: -I/usr/include/python2.7: No such file or directory
make[3]: *** [bitvec.lo] Error 1
make[3]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src'
make: *** [all-recursive] Error 1
I have checked under /usr/include and I can see python2.7 folder there. But, in the above it says that gcc can not find the python2.7 directory. I am kind of lost. Any help would be appreciated.
Thanks
GCC is interpreting that argument as the name of a file to be compiled, not a -I option. I find it exceedingly odd that it's putting quotes around one of the arguments. My suspicion is that this is because one of the characters in that argument is not a standard ASCII character. For example maybe you've used a different dash character (not ASCII code 45 / hex 0x2d, but instead some other character code that shows up sort of like a dash).

Building memcached 1.4.x on windows error with cygwin

I'm trying to build memcached on Windows. Here's what I get:
$ make
make all-recursive
make[1]: Entering directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6'
Making all in doc
make[2]: Entering directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6/doc'
make all-am
make[3]: Entering directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6/doc'
make[2]: Leaving directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6/doc'
make[2]: Entering directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6'
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DNDEBUG -I/usr/local/include -g -O2 -pthread -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declaration
s -Wredundant-decls -MT memcached-memcached.o -MD -MP -MF .deps/memcached-memcached.Tpo -c -o memcached-memcached.o `test -f 'memcached.c' || echo './
'`memcached.c
gcc: unrecognized option '-pthread'
cc1: warnings being treated as errors
memcached.c: In function `sanitycheck':
memcached.c:4361: error: array subscript has type `char'
make[2]: *** [memcached-memcached.o] Error 1
make[2]: Leaving directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/d/Project Storage/adam/memcached-1.4.6'
Is there something that I've missed?
First, you must configure with static linkage
export CFLAGS='-static -static-libgcc'
Then just add a cast to int in sanitycheck
!isdigit((int)ever[3]))
If you'd like the testapp.c I had to change the sigaction init to
struct sigaction action; // The init here did not work with cygwin gcc 4.5.3
action.sa_flags=0;
action.sa_handler=SIG_IGN;
The problem is that they've configured CFLAGS with -Werror . Hence the warning you got stopped the build.
You can edit the Makefile, remove -Werror and you should be able to continue with the build.

Resources