Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 193489 - dev-lang/ocaml doesn't compile w/ --Wl,--as-needed
Summary: dev-lang/ocaml doesn't compile w/ --Wl,--as-needed
Status: RESOLVED DUPLICATE of bug 189238
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Team for the ML programming language family
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-23 09:19 UTC by Jack Kelly
Modified: 2007-09-23 10:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Filter -Wl,--as-needed in the ebuild (filter-as-needed.patch,500 bytes, patch)
2007-09-23 09:19 UTC, Jack Kelly
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Kelly 2007-09-23 09:19:20 UTC
I noticed that net-misc/unison will fail to build due to missing symbols if dev-lang/ocaml is built with '-Wl,--as-needed' in LDFLAGS.

Reproducible: Always

Steps to Reproduce:
1. LDFLAGS="-Wl,--as-needed" emerge '=dev-lang/ocaml-3.09.3-r1'
2. emerge unison
3. it breaks
4. emerge ocaml
5. emerge unison
6. it works.

Actual Results:  
emerge unison fails during link:

pty.o: In function `c_openpty':
pty.c:(.text+0x2d): undefined reference to `openpty'
collect2: ld returned 1 exit status
Error during linking
make: *** [unison] Error 2


Expected Results:  
emerge unison succeeds
Comment 1 Jack Kelly 2007-09-23 09:19:43 UTC
Created attachment 131669 [details, diff]
Filter -Wl,--as-needed in the ebuild
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-09-23 09:23:38 UTC
Comment on attachment 131669 [details, diff]
Filter -Wl,--as-needed in the ebuild

Filtering flags doesn't solve anything.
Comment 3 Alexis Ballier gentoo-dev 2007-09-23 09:38:42 UTC
unless I missed something, that's not ocaml which is failing but unison

*** This bug has been marked as a duplicate of bug 189238 ***
Comment 4 Jack Kelly 2007-09-23 10:44:45 UTC
(In reply to comment #3)
> unless I missed something, that's not ocaml which is failing but unison
> 
> *** This bug has been marked as a duplicate of bug 189238 ***
> 

The fault is due to ocaml being built with -Wl,--as-needed. It can be solved by adding more to unison's link step or by filtering --as-needed in ocaml.