Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 5006] New: make performs library lookup in the build and host library directores and not in the staging area
@ 2012-04-01  6:40 bugzilla at busybox.net
  2012-04-01  6:41 ` [Buildroot] [Bug 5006] " bugzilla at busybox.net
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugzilla at busybox.net @ 2012-04-01  6:40 UTC (permalink / raw)
  To: buildroot

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

           Summary: make performs library lookup in the build and host
                    library directores and not in the staging area
           Product: buildroot
           Version: 2012.02
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: develop at kristov.de
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


Consider the following Makefile:

CC = gcc
prog: prog.o -lcrypt
        $(CC) -o $@ $^

This links prog.o to libcrypt.so in the staging area, but GNU make searches for
the library in the following directories:

/lib
/usr/lib
$(HOST_DIR)/usr/lib

which is obviously wrong in a cross-compiling environment. (The paths are
hard-coded in remake.c at the beginning of the function directory_search).

I have attached a patch that fixes this bug. It removes LIBDIR (which is
defined to $(HOST_DIR)/usr/lib in the make's Makefile) from the search path and
replaces the hard-coded paths by @LIBDIR@ and @USRLIBDIR@, respectively. In the
buildroot's make.mk, these strings are replaced by the correct staging library
paths.

However, this patch only works in combination with a host-make as requested in
bug #4922, where the discussion has not reached a final consensus yet :-(

Regards,

Christoph Schulz

-- 
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] 9+ messages in thread

end of thread, other threads:[~2013-05-26 15:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01  6:40 [Buildroot] [Bug 5006] New: make performs library lookup in the build and host library directores and not in the staging area bugzilla at busybox.net
2012-04-01  6:41 ` [Buildroot] [Bug 5006] " bugzilla at busybox.net
2012-04-01  6:42 ` bugzilla at busybox.net
2012-04-01  6:42 ` bugzilla at busybox.net
2012-04-16 19:32 ` bugzilla at busybox.net
2012-04-16 19:45 ` bugzilla at busybox.net
2012-04-17 22:03 ` bugzilla at busybox.net
2013-05-26 15:17 ` bugzilla at busybox.net
2013-05-26 15:18 ` bugzilla at busybox.net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox