--- Quote Start ---
originally posted by leewood@Jul 31 2006, 02:27 AM
hi,
i compiled the kernel with building libpng (kernel/library/defaul tselection->customize vendor /user settings->library configuration->build libpng).i have selected building libz which was needed by libpng.
but it failed.the error as follow:
.......
make[2]: entering directory `/home/leewood/uclinux-dist-test/include'
find . -depth -type l -a ! -name makefile | xargs rm > /dev/null 2>&1 || exit 0
find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0
making symlinks in include/
making include/c++ symlink to compiler c++ includes
make[2]: leaving directory `/home/leewood/uclinux-dist-test/include'
make[2]: entering directory `/home/leewood/uclinux-dist-test/lib'
making symlinks in lib/
make[2]: leaving directory `/home/leewood/uclinux-dist-test/lib'
make[2]: entering directory `/home/leewood/uclinux-dist-test/include'
find . -depth -type l -a ! -name makefile | xargs rm > /dev/null 2>&1 || exit 0
find . -depth -type d | xargs rmdir > /dev/null 2>&1 || exit 0
making symlinks in include/
making include/c++ symlink to compiler c++ includes
make[2]: leaving directory `/home/leewood/uclinux-dist-test/include'
make[2]: entering directory `/home/leewood/uclinux-dist-test/lib'
making symlinks in lib/
make[2]: leaving directory `/home/leewood/uclinux-dist-test/lib'
make[2]: entering directory `/home/leewood/uclinux-dist-test/lib/zlib'
make[2]: nothing to be done for `all'.
make[2]: leaving directory `/home/leewood/uclinux-dist-test/lib/zlib'
make[2]: entering directory `/home/leewood/uclinux-dist-test/lib'
making symlinks in lib/
make[2]: leaving directory `/home/leewood/uclinux-dist-test/lib'
make[2]: entering directory `/home/leewood/uclinux-dist-test/lib/libpng'
nios2-linux-uclibc-gcc -shared -wl,-soname,libpng.so.2 -o libpng.so.2.1.0.12
png.pic.o pngset.pic.o pngget.pic.o pngrutil.pic.o pngtrans.pic.o pngwutil.pic.o pngread.pic.o pngrio.pic.o pngwio.pic.o pngwrite.pic.o pngrtran.pic.o pngwtran.pic.o pngmem.pic.o pngerror.pic.o pngpread.pic.o -l../zlib -lz -lm -lc
nios2-linux-uclibc-gcc: unrecognized option `-shared'
/opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/lib/crt1.o(.text+0x10): in function `_start':
: undefined reference to `main'
/opt/nios2/lib/gcc/nios2-linux-uclibc/3.4.6/../../../../nios2-linux-uclibc/lib/crt1.o(.text+0x14): in function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [libpng.so.2.1.0.12] 错误 1
make[2]: leaving directory `/home/leewood/uclinux-dist-test/lib/libpng'
make[1]: *** [all] 错误 2
make[1]: leaving directory `/home/leewood/uclinux-dist-test/lib'
make: *** [subdirs] 错误 1
[leewood@localhost uclinux-dist-test]$
pls help.thanks!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=17277)
--- quote end ---
--- Quote End ---
hi leewood,
You might have solved problem by your self, but if not, then here is the reason......
nios2-linux-uclibc-gcc: unrecognized option `-shared'
nios2-linux-uclibc-gcc does not compile shared libraries, you need to compile libpng lib as static.
nios2-linux-uclibc-gcc will not take "-g", "-shared" options.
What you need to do is ..... in configure script either give "static" option or either remove "-shared" from your all Makefiles.
Do remember to make distclean your code : ).
thanks,
Ankur