解決MT7620A "squashfs3.2-r2" 編譯問題
SDK Version: 4.3.0.0
編譯問題:
問題1.
cc mksquashfs.o read_fs.o sort.o -lz -L/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_Alone -L/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_C -lpthread -lunlzma_r -llzma_r -lstdc++ -o mksquashfs
/usr/bin/ld: mksquashfs.o: undefined reference to symbol 'log10@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [mksquashfs] Error 1
make[1]: Leaving directory `/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/squashfs3.2-r2/squashfs-tools'
make: *** [all] Error 2
將
24 mksquashfs: LDLIBS += -lpthread -lunlzma_r -llzma_r -lstdc++
25 mksquashfs: mksquashfs.o read_fs.o sort.o
26
24 mksquashfs: LDLIBS += -lpthread -lunlzma_r -llzma_r -lstdc++ -lm
25 mksquashfs: mksquashfs.o read_fs.o sort.o
26
問題2.
cc unsquashfs.o -lz -L/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_Alone -L/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_C -lunlzma -o unsquashfs
/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_C/libunlzma.a(uncomp.o): In function `sqlzma_un':
uncomp.c:(.text+0x4b): 未定義參考到「inflateReset」
uncomp.c:(.text+0x8c): 未定義參考到「inflate」
uncomp.c:(.text+0x180): 未定義參考到「zError」
/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/lzma443/C/7zip/Compress/LZMA_C/libunlzma.a(uncomp.o): In function `sqlzma_init':
uncomp.c:(.text+0x3a3): 未定義參考到「inflateInit_」
collect2: error: ld returned 1 exit status
make[1]: *** [unsquashfs] Error 1
make[1]: Leaving directory `/home/paddy/workspace/project/mediatek/apsoc/RT288x_SDK/toolchain/mksquash_lzma-3.2/squashfs3.2-r2/squashfs-tools'
make: *** [all] Error 2
解決: 在mksquash_lzma-3.2/squashfs3.2-r2/squashfs-tools/Makefile中增加 -lz
將
30
31 unsquashfs: LDLIBS += -lunlzma
32 unsquashfs: unsquashfs.o
修改成
30
31 unsquashfs: LDLIBS += -lunlzma -lz
32 unsquashfs: unsquashfs.o
以上!
沒有留言:
張貼留言