1. Verify that the PTYs are working properly
expect -c "spawn ls"
This command should output the followingspawn ls
2. Indicate library path, and make sure libbfd-2.25.so and libdl-2.20.so is under library folder.
export LD_LIBRARY_PATH=/lib:/usr/lib
3. Make binutils-build and ./configuremkdir -v ../binutils-build
cd ../binutils-build
../binutils-2.25/configure --prefix=/usr \
--enable-shared \
--disable-werror\
LIBS=-ldl-2.20
3. Compiler and Install package
make tooldir=/usr
make tooldir=/usr install
Problem:
error: undefined reference to 'dlsym'
error: undefined reference to 'dlopen'
error: undefined reference to 'dlclose'
Method 1:vim lfs/tmp/binutils-build/Makefile +384
LDFLAGS = --> LDFLAGS = -ldl-2.20
Method 2:../binutils-2.25/configure --prefix=/usr \
--enable-shared \
--disable-werror\
LIBS=-ldl-2.20
Reference:
1. 6.13. Binutils-2.25
2. Error compiling under Precise " undefined reference to ‘dlsym’ "
0 意見:
張貼留言