Debian 32 位主机 PC,在 /opt 目录中具有预构建的工具链,目标是 ARM。我正在尝试从源代码构建项目(f/w 图像),代码编译期间出现错误。该项目结构复杂,有多个自动生成的makefile,递归地位于子目录中,组成了整个系统。我已经修复了编译过程中发生的一些错误,但每次都会出现新的错误。构建停止在某个目录(pppd):
make[3]: Entering directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1'
make -C pppd
make[4]: Entering directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd'
/opt/emlix/pnx8181/bin/arm-linux-gnueabi-gcc -O2 -pipe -Wall -g -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include '-DDESTDIR="/usr/local"' -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DMAXOCTETS -Wl,-E -o pppd main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o eap.o chap-md5.o md4.o chap_ms.o sha1.o pppcrypt.o multilink.o tdb.o spinlock.o -lcrypt -ldl
main.o:(.data+0x18): undefined reference to `cbcp_protent'
auth.o: In function `network_phase':
auth.c:(.text+0x28bc): undefined reference to `cbcp_protent'
multilink.o: In function `iterate_bundle_links':
/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd/multilink.c:364: undefined reference to `pppdb'
multilink.o: In function `remove_bundle_link':
/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd/multilink.c:352: undefined reference to `pppdb'
multilink.o: In function `make_bundle_links':
/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd/multilink.c:308: undefined reference to `pppdb'
multilink.o: In function `mp_join_bundle':
/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd/multilink.c:209: undefined reference to `pppdb'
collect2: ld returned 1 exit status
Makefile:209: recipe for target 'pppd' failed
make[4]: *** [pppd] Error 1
make[4]: Leaving directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd'
Makefile.cyt:18: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1'
/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_pppd' failed
make[2]: *** [_subdir_pppd] Error 2
make[2]: Leaving directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source'
/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_open_source' failed
make[1]: *** [_subdir_open_source] Error 2
make[1]: Leaving directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router'
Rules.mk:74: recipe for target '_subdir_router' failed
make: *** [_subdir_router] Error 2
显示了未定义的引用,因此某些文件,但我确信代码中没有语法错误,它可能由于依赖项或路径损坏而出现。在这个地方,这条路径对我来说看起来是错误的:-I../include '-DDESTDIR="/usr/local"'
make[4]: Entering directory '/home/viltek/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd'
/opt/emlix/pnx8181/bin/arm-linux-gnueabi-gcc -O2 -pipe -Wall -g -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include '-DDESTDIR="/usr/local"' -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DMAXOCTETS -Wl,-E -o pppd main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o auth.o options.o demand.o utils.o sys-linux.o ipxcp.o tty.o eap.o chap-md5.o md4.o chap_ms.o sha1.o pppcrypt.o multilink.o tdb.o spinlock.o -lcrypt -ldl
我与成功构建的 make.log 进行了比较,它看起来有所不同:
make[4]: Entering directory `/home/jlai2/project/payton_gpl/src/fullimage/payton/src/test/payton_1.3.2.009_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd'
/opt/emlix/pnx8181/bin/arm-linux-gnueabi-gcc -O2 -pipe -Wall -D__linux__=1 -DHAVE_PATHS_H -DHAVE_MMAP -I../include -I/home/jlai2/project/payton_gpl/src/fullimage/payton/src/test/payton_1.3.2.009_gpl/payton/src/router/open_source/include -DCHAPMS=1 -DMPPE=1 -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DPLUGIN -DCBCP_SUPPORT -c -o main.o main.c
main.c: In function '_run_script':
main.c:1228: warning: unused variable 'i'
main.c:1227: warning: unused variable 'buf'
是什么原因导致后面不包含完整路径-I../包括?