Error while installing tiff-3.8.2 - libtiff

pranav#pranav-Inspiron-1545:~/dependency/tiff-3.8.2$ make
Making all in port
make[1]: Entering directory `/home/pranav/dependency/tiff-3.8.2/port'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/pranav/dependency/tiff-3.8.2/port'
Making all in libtiff
make[1]: Entering directory `/home/pranav/dependency/tiff-3.8.2/libtiff'
make all-am
make[2]: Entering directory `/home/pranav/dependency/tiff-3.8.2/libtiff'
if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -Wall -W -MT tif_jpeg.lo -MD -MP -MF ".deps/tif_jpeg.Tpo" -c -o tif_jpeg.lo tif_jpeg.c; \
then mv -f ".deps/tif_jpeg.Tpo" ".deps/tif_jpeg.Plo"; else rm -f ".deps/tif_jpeg.Tpo"; exit 1; fi
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -Wall -W -MT tif_jpeg.lo -MD -MP -MF .deps/tif_jpeg.Tpo -c tif_jpeg.c -fPIC -DPIC -o .libs/tif_jpeg.o
In file included from /usr/local/include/jpeglib.h:27:0,
from tif_jpeg.c:87:
/usr/local/include/jmorecfg.h:263:16: error: expected identifier before numeric constant
tif_jpeg.c: In function 'JPEGVSetField':
tif_jpeg.c:1578:8: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
make[2]: *** [tif_jpeg.lo] Error 1
make[2]: Leaving directory `/home/pranav/dependency/tiff-3.8.2/libtiff'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/pranav/dependency/tiff-3.8.2/libtiff'
make: *** [all-recursive] Error 1

Edit file: /usr/local/include/jmorecfg.h
change line:
typedef enum { FALSE = 0 , TRUE = 1 } boolean;
to:
typedef enum { false= 0 , true= 1 } boolean;
Then, make successful.

I met this error when I compile for install emacs, and I don't think this is a perfect solution, my solution is change the source file which called jpeglib.h, before change:
# include <jpeglib.h>
after:
#define HAVE_BOOLEAN
typedef unsigned char boolean;
# include <jpeglib.h>
#undef HAVE_BOOLEAN
this solution work fine.

Related

`make` error : Nothing to be done for `all'

I'm trying to compile IRSTLM toolbox on my mac. I successfully run regenerate-makefiles.sh and ./configure but I get this error when executing make :
1 warning generated.
mv -f .deps/verify-caching.Tpo .deps/verify-caching.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -isystem/usr/include -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -g -O2 -o verify-caching verify-caching.o -lirstlm -lz
libtool: link: g++ -isystem/usr/include -W -Wall -ffor-scope - D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -g -O2 -o .libs/verify-caching verify-caching.o -Wl,-bind_at_load /Users/alinejad/Downloads/irstlm- 5.80.08/trunk/src/.libs/libirstlm.dylib -lz
Making all in scripts
make[2]: Nothing to be done for `all'.
Making all in doc
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all-am'.
I've already checked tab in 'all' command.

vowpal wabbit installation make file

I am having a hard time installing vowpal wabbit.
The problem I run into is after cloning vw, when I run the command make. Error message below
Would highly appreciate any help!
OS: Windows 8.1 64 bit
Thanks
A
$ make
Making all in vowpalwabbit
make[1]: Entering directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
make all-am
make[2]: Entering directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include
-O3 -fomit-frame-pointer -ffast-math -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -DNDEBUG -
Wall -pedantic -std=c++0x -MT global_data.lo -MD -MP -MF .deps/global_data.Tpo -c -o global_data.lo global_data.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -O3 -fomit-frame-pointer - ffast-math -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -pedantic -std=c++0x -MT global_data.lo -MD -MP -MF .deps/global_data.Tpo -c global_data.cc -DDLL_EXPORT -DPIC -o .libs/global_data.o
In file included from comp_io.h:7:0,
from global_data.h:17,
from global_data.cc:13:
io_buf.h: In member function 'virtual int io_buf::open_file(const char*, bool, int)':
io_buf.h:72:25: error: 'fileno' was not declared in this scope ret = fileno(stdin);
In file included from global_data.h:17:0,
from global_data.cc:13:
comp_io.h: In member function 'virtual int comp_io_buf::open_file(const char*, bool, int)':
comp_io.h:28:34: error: 'fileno' was not declared in this scope
fil = gzdopen(fileno(stdin), "rb");
^
global_data.cc: In constructor 'vw::vw()':
global_data.cc:295:32: error: 'fileno' was not declared in this scope
stdout_fileno = fileno(stdout);
^
Makefile:619: recipe for target 'global_data.lo' failed
make[2]: *** [global_data.lo] Error 1
make[2]: Leaving directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
Makefile:390: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Alejandro/vowpal_wabbit/vowpalwabbit'
Makefile:503: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I could not solve the issue, but at least I can point you to a vowpalwabbit executable file. So you do not have to make it.
https://github.com/MLWave/vowpal-wabbit-cygwin-executables
A noble soul from Kaggle pointed me to this link. You need to install Cycwin and execute the .exe from cygwin.
There is also a pure Windows executable build https://github.com/MLWave/Kaggle_Rotten_Tomatoes
Also provided by Triskelion, the same folk who provided the build above. His advice: To run that use "cmd" to open a console, don't click on the file.

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