Bigorneau / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

Compile error on gentoo x64 (glibc2.17) #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. clone
2. cd src/squashfs-2.1-r2
3. make

What is the expected output? What do you see instead?

gcc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2   -c -o mksquashfs.o 
mksquashfs.c
mksquashfs.c: In function ‘dir_scan’:
mksquashfs.c:1444:6: warning: format ‘%Ld’ expects argument of type ‘long 
long int’, but argument 3 has type ‘__off_t’ [-Wformat]
mksquashfs.c: In function ‘write_file’:
mksquashfs.c:1170:14: warning: ignoring return value of ‘ftruncate’, 
declared with attribute warn_unused_result [-Wunused-result]
gcc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2   -c -o read_fs.o 
read_fs.c
gcc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -O2   -c -o sort.o sort.c
make -C ../lzma/C/7zip/Compress/LZMA_Lib
make[1]: Entering directory 
`/home/seqizz/firmware-mod-kit/src/lzma/C/7zip/Compress/LZMA_Lib'
g++ -O3 -Wall -c  -I ../../../ ZLib.cpp
ZLib.cpp:183:31: error: expected initializer before ‘OF’
make[1]: *** [ZLib.o] Error 1
make[1]: Leaving directory 
`/home/seqizz/firmware-mod-kit/src/lzma/C/7zip/Compress/LZMA_Lib'
make: *** [mksquashfs-lzma] Error 2

Please provide any additional information below.

x86_64-pc-linux-gnu-4.7.3

Sorry if there is a "supported gcc versions" list

Original issue reported on code.google.com by seq...@gmail.com on 31 Oct 2013 at 11:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
A quick google of this issue results in this page it turns out that the issue 
can be resolved by replacing OF with _Z_OF see 
https://code.google.com/p/fritzing/issues/detail?id=1854

Original comment by abaezemobolaji on 13 Nov 2013 at 3:03

GoogleCodeExporter commented 9 years ago
Yes, gentoo has removed OF from their zlib package. Try adding -DOF=_Z_OF to 
CFLAGS.

Original comment by heffne...@gmail.com on 29 May 2014 at 11:10

GoogleCodeExporter commented 9 years ago
adding -DOF=_Z_OF to CFLAGS is bad idea. change system for this bug? try this:

find -name ZLib.cpp -exec sed -i 's/ OF(/ _Z_OF(/g' {} \;

Original comment by rherin...@gmail.com on 28 Sep 2014 at 9:16