[Buildroot] [PATCH v3] ShellInABox: new package
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sun Feb 28 21:11:43 UTC 2016
Hello,
On Sun, 28 Feb 2016 17:33:08 -0300, Lucas Zampar wrote:
> The work is almost done. I have a question:
> When I`m compiling the package I get:
>
> libtool: link:
> /work/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc
> -g -std=gnu99 -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64 -Os -static -o shellinaboxd
> shellinabox/shellinaboxd.o shellinabox/externalfile.o
> shellinabox/launcher.o shellinabox/privileges.o shellinabox/service.o
> shellinabox/session.o shellinabox/usercss.o ./.libs/liblogging.a
> ./.libs/libhttp.a -lz -ldl -lutil
>
> /work/buildroot/output/host/usr/lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.3/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> cannot find -lz
> collect2: error: ld returned 1 exit status
>
>
> To solve the problem with libz, I created the patch shellinabox
> -2.19-remove-static-library.patch:
> ..
> +#shellinaboxd_LDFLAGS = -static
> ..
>
> Is it the best way to solve this? I checked and libz is compiled and
> available at my buildroot environment.
Linking with -static by default is indeed not very good, so removing
-static is a good idea.
However, it doesn't solve the problem: the user may have, in his
Buildroot configuration, request to link everything statically, in
which case Buildroot will pass -static in LDFLAGS.
So you really need to fix the problem.
Can you send the patch so that we can reproduce the problem?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list