All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08
@ 2010-11-04  9:29 bugzilla at busybox.net
  2010-11-04  9:30 ` [Buildroot] [Bug 2767] " bugzilla at busybox.net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2010-11-04  9:29 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=2767

           Summary: Build for lsof broken in buildroot-2010.08
           Product: buildroot
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: andyg1001 at hotmail.co.uk
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


Created attachment 2635
  --> https://bugs.busybox.net/attachment.cgi?id=2635
Error log

The build process for the lsof package has been broken in buildroot-2010.08. 
In buildroot-2010.05 it was not broken.

The attached build log file shows the error as it occurs.  Note how the
compiler options passed to make via CFGF, don't actually get passed to gcc, as
should be the case.

The problem has been tracked down to a change made in buildroot: specifically
that it now includes CFLAGS="..." in TARGET_CONFIGURE_OPTS, whereas before this
was not the case.

However, the Configure script for lsof also generates its own CFLAGS
declaration inside the Makefile, which is now overridden by that given by
buildroot.  Fortunately, lsof has a partial solution to this problem which is
the LSOF_CFLAGS_OVERRIDE=1 configuration option.  CFLAGS from buildroot is
still then passed through Configure and incorporated into the CFLAGS
declaration inside the Makefile, but then the Makefile declaration of CFLAGS
can then be marked 'override' so that when calling make, it continues to build
correctly.

Unfortunately, the solution provided by lsof is only partial.  The
configuration option only applies to liblsof, not the application itself.

Attached also is a patch file that fixes both this, plus adds the configuration
option into the package's lsof.mk file.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 2767] Build for lsof broken in buildroot-2010.08
  2010-11-04  9:29 [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08 bugzilla at busybox.net
@ 2010-11-04  9:30 ` bugzilla at busybox.net
  2010-11-04 15:36 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2010-11-04  9:30 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=2767

--- Comment #1 from Andy Gibbs <andyg1001@hotmail.co.uk>  ---
Created attachment 2641
  --> https://bugs.busybox.net/attachment.cgi?id=2641
Proposed patch

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 2767] Build for lsof broken in buildroot-2010.08
  2010-11-04  9:29 [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08 bugzilla at busybox.net
  2010-11-04  9:30 ` [Buildroot] [Bug 2767] " bugzilla at busybox.net
@ 2010-11-04 15:36 ` bugzilla at busybox.net
  2010-11-04 16:06 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2010-11-04 15:36 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=2767

--- Comment #2 from Thomas Petazzoni <thomas.petazzoni@free-electrons.com>  ---
I've tried to build lsof today, but it fails because the FTP server rejects
anonymous logins:


--2010-11-04 16:28:39-- 
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof//lsof_4.81.tar.bz2
           => `/home/thomas/local/buildroot-dl/lsof_4.81.tar.bz2'
Resolving lsof.itap.purdue.edu... 128.210.7.20
Connecting to lsof.itap.purdue.edu|128.210.7.20|:21... connected.
Logging in as anonymous ... 
Error in server greeting.
Retrying.

Does it work for you ? If not, we should switch to using the tarball made
available by Debian, as we do for some other packages.

Moreover, I'm not terribly happy with the approach. If Buildroot passes some
CFLAGS, it's done with reason, so those CFLAGS should be taken into account,
not overriden by the package build logic. So rather than having the CFLAGS
passed on the command line ignored, I'd prefer to see them *added* to the
internal package CFLAGS.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 2767] Build for lsof broken in buildroot-2010.08
  2010-11-04  9:29 [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08 bugzilla at busybox.net
  2010-11-04  9:30 ` [Buildroot] [Bug 2767] " bugzilla at busybox.net
  2010-11-04 15:36 ` bugzilla at busybox.net
@ 2010-11-04 16:06 ` bugzilla at busybox.net
  2010-11-04 16:10 ` bugzilla at busybox.net
  2010-11-04 16:17 ` bugzilla at busybox.net
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2010-11-04 16:06 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=2767

--- Comment #3 from Andy Gibbs <andyg1001@hotmail.co.uk>  ---
Thomas,

I do get it downloading, but it I believe it picks it up from the
sources.buildroot.org mirror instead of the ftp site, so maybe best to change
to the debian distribution site.

Regarding the use of CFLAGS, inside the Makefile is defined:

CFLAGS= ${CDEFS} ${INCL} ${DEP} ${DEBUG}

which expands to

CFLAGS= ${CDEF} ${CFGF} ${DINC} ${CFGD} ${CFGDN} ${DEBUG}

Now when make is invoked, buildroot's CFLAGS are passed via DEBUG:

$(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" -C
$(LSOF_DIR)/lsof_$(LSOF_VERSION)_src

However, if TARGET_CONFIGURE_OPTS also holds CFLAGS, then the CFLAGS declared
inside the Makefile is overridden and all the additional flags that are
required (e.g. from CFGF) are lost.

This is why I have patched it to put the "override" keyword ahead of the
Makefile's CFLAGS declaration.  Buildroot's CFLAGS are still sent forward, via
DEBUG, so that's not a problem.

Does this explain the situation better?

Cheers
Andy

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 2767] Build for lsof broken in buildroot-2010.08
  2010-11-04  9:29 [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08 bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2010-11-04 16:06 ` bugzilla at busybox.net
@ 2010-11-04 16:10 ` bugzilla at busybox.net
  2010-11-04 16:17 ` bugzilla at busybox.net
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2010-11-04 16:10 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=2767

--- Comment #4 from Andy Gibbs <andyg1001@hotmail.co.uk>  ---
(In reply to comment #3)
> Now when make is invoked, buildroot's CFLAGS are passed via DEBUG:
> [ snip ]

Sorry, I should probably just point out that this is the original behaviour for
building the package, not something that I've changed in my patch.  Perhaps
this problem is the reason why the original package worked this way?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [Bug 2767] Build for lsof broken in buildroot-2010.08
  2010-11-04  9:29 [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08 bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2010-11-04 16:10 ` bugzilla at busybox.net
@ 2010-11-04 16:17 ` bugzilla at busybox.net
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla at busybox.net @ 2010-11-04 16:17 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=2767

Peter Korsgaard <jacmet@uclibc.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Peter Korsgaard <jacmet@uclibc.org>  ---
Committed, thanks

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-04 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04  9:29 [Buildroot] [Bug 2767] New: Build for lsof broken in buildroot-2010.08 bugzilla at busybox.net
2010-11-04  9:30 ` [Buildroot] [Bug 2767] " bugzilla at busybox.net
2010-11-04 15:36 ` bugzilla at busybox.net
2010-11-04 16:06 ` bugzilla at busybox.net
2010-11-04 16:10 ` bugzilla at busybox.net
2010-11-04 16:17 ` bugzilla at busybox.net

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.