Status: Unconfirmed
Owner: ----
Labels: OS-Linux Area-Misc Size-Medium Type-Bug

New issue 20014 by ambrop7: gyp linking fails because of $(LIBS) in link  
command
http://code.google.com/p/chromium/issues/detail?id=20014

Chrome Version       : <include svn revno; e.g. dpkg -s chromium-browser>
OS + version : Gentoo Linux amd64
CPU architecture (32-bit / 64-bit): 64-bit
window manager :
URLs (if applicable) :
Behavior in Firefox 3.x (if applicable):
Behavior in Chrome for Windows (optional):

What steps will reproduce the problem?
1. on Linux x86_64 try to compile with "./tools/gyp/gyp -f make
build/all.gyp -Dtarget_arch=x64 && make V=1"

What happens instead?
   g++ -pthread -rdynamic  -o
/home/ambro/chromium/chromium/src/out/Debug/obj/third_party/codesighs/nm2tsv  
-Wl,--start-group
/home/ambro/chromium/chromium/src/out/Debug/obj/third_party/codesighs/nm2tsv.o
-Wl,--end-group -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0
-lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lfontconfig -lfreetype
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
-lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype
-lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lX11 -lXrender -lXext
-lrt -lssl3 -lsmime3 -lnssutil3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread
-ldl -lrt -lgconf-2 -lglib-2.0 -lX11 -lasound
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lssl3

It can be seen that way too much '-l' flags are used in every single link
command, and the links fail because '-L' flags are missing. This is because
.mk files included in the root Makefile use $(LIBS) internally, so the last
included file that defines $(LIBS) actually appends these to all link
commands (my case chrome/url_fetch_test.mk). Solution is to remove $(LIBS)
from link commands. All needed flags are already added to the target's
$(LDFLAGS).
Patch atteched.

Attachments:
        chrome-gyp.patch  878 bytes

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to