Could not be compiled under ubuntu 16
nihuo opened this issue · 11 comments
nihuo commented
Got below link errors
unix.c:(.text+0x186c): warning: lchmod is not implemented and will always fail
extract.o: In function `extract_or_test_entrylist':
extract.c:(.text+0x1c08): undefined reference to `lzfse_decode_buffer'
extract.o: In function `UZlzfse_decode':
extract.c:(.text+0x4bd0): undefined reference to `lzfse_decode_buffer'
collect2: error: ld returned 1 exit status
unix/Makefile:283: recipe for target 'unzip' failed
make[1]: *** [unzip] Error 1
make[1]: Leaving directory '/home/x1/lzfse/unzip-lzfse'
unix/Makefile:544: recipe for target 'generic' failed
make: *** [generic] Error 2
Could you tell me how to fix it? Thanks in advance.
sskaje commented
Did you make & install lzfse before building unzip-lzfse?
nihuo commented
Yes, lzfse had been made & installed before
nihuo commented
same error :(
nihuo commented
In my Macbook, it could be perfectly compiled
nihuo commented
I just tested on CentOS 7, same error
nihuo commented
Got a little progress.
build lzfse with below commands
mkdir build
cd build
cmake ..
make install
after these command and build unzip project will be success. But when using the unzip extract ipa file, got below message:
`LZFSE' method not supported
torshie commented
看Makefile最后输出的那个链接命令,cc -o unzip ... -llzfse ... -s 把 -llzfse 放到-s后面即可成功链接
sskaje commented
root@dev206:~/build/unzip-lzfse# cc -o unzip -L/usr/local/lib -s -llzfse -Lbzip2 unzip.o crc32.o crypt.o envargs.o explode.o extract.o fileio.o globals.o inflate.o list.o match.o process.o ttyio.o ubz2err.o unreduce.o unshrink.o zipinfo.o unix.o
unix.o: In function `set_symlnk_attribs':
unix.c:(.text+0x194c): warning: lchmod is not implemented and will always fail
extract.o: In function `extract_or_test_entrylist':
extract.c:(.text+0x1992): undefined reference to `lzfse_decode_buffer'
extract.o: In function `UZlzfse_decode':
extract.c:(.text+0x4d20): undefined reference to `lzfse_decode_buffer'
collect2: error: ld returned 1 exit status
root@dev206:~/build/unzip-lzfse# cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.2.0-8ubuntu3.2' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)
nihuo commented
COOL!!!!!!!! It works now!
Thank you very much!