All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] ShellInABox: new package
Date: Sun, 28 Feb 2016 22:11:43 +0100	[thread overview]
Message-ID: <20160228221143.6a8cbcd4@free-electrons.com> (raw)
In-Reply-To: <CAMt=8UKtsMxQcE1c7UCGd+cC5RxdRrMnayqCX-qOtn+TLVqUJQ@mail.gmail.com>

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

      reply	other threads:[~2016-02-28 21:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 15:11 [Buildroot] [PATCH v3] ShellInABox: new package Lucas Zampar Bernardi
2016-02-06 15:17 ` Lucas Zampar
2016-02-10  0:28 ` Arnout Vandecappelle
2016-02-21 21:35 ` Thomas Petazzoni
2016-02-23 16:46   ` Mauro Condarelli
2016-02-23 20:30     ` Arnout Vandecappelle
     [not found]     ` <CAMt=8UJvLdPCTm1aNgbd_szbbRhmpb005GNE9VOs-jfHLwN9tQ@mail.gmail.com>
2016-02-28 20:33       ` Lucas Zampar
2016-02-28 21:11         ` Thomas Petazzoni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160228221143.6a8cbcd4@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.