Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189238 - net-misc/unison-2.17.1-r1 compilation fails with --as-needed
Summary: net-misc/unison-2.17.1-r1 compilation fails with --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Team for the ML programming language family
URL:
Whiteboard:
Keywords:
: 193489 (view as bug list)
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2007-08-17 15:14 UTC by Tiziano Müller (RETIRED)
Modified: 2008-01-27 15:25 UTC (History)
5 users (show)

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


Attachments
unison-2.17.1-as-needed.patch (unison-2.17.1-as-needed.patch,432 bytes, patch)
2007-08-17 20:40 UTC, Santiago M. Mola (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2007-08-17 15:14:37 UTC
Linking unison
ocamlopt -verbose -I lwt -I ubase -I +lablgtk2 -o unison   unix.cmxa str.cmxa lablgtk.cmxa -cclib -lutil ubase/projectInfo.cmx ubase/myMap.cmx ubase/safelist.cmx ubase/uprintf.cmx ubase/util.cmx ubase/rx.cmx ubase/uarg.cmx ubase/prefs.cmx ubase/trace.cmx lwt/pqueue.cmx lwt/lwt.cmx lwt/lwt_util.cmx lwt/lwt_unix.cmx case.cmx pred.cmx uutil.cmx fileutil.cmx name.cmx path.cmx fspath.cmx fingerprint.cmx abort.cmx osx.cmx props.cmx fileinfo.cmx os.cmx lock.cmx clroot.cmx common.cmx tree.cmx checksum.cmx terminal.cmx transfer.cmx xferhint.cmx remote.cmx copy.cmx globals.cmx stasher.cmx update.cmx files.cmx sortri.cmx recon.cmx transport.cmx strings.cmx uicommon.cmx uitext.cmx main.cmx pixmaps.cmx uigtk2.cmx linkgtk2.cmx osxsupport.o pty.o
+ as -o /var/tmp/paludis/net-misc/unison-2.17.1-r1/temp/camlstartup7fa45e.o /var/tmp/paludis/net-misc/unison-2.17.1-r1/temp/camlstartup2ff732.s
+ gcc -Wl,--as-needed  -o 'unison' -I'/usr/lib64/ocaml'  '/var/tmp/paludis/net-misc/unison-2.17.1-r1/temp/camlstartup7fa45e.o' '/usr/lib64/ocaml/std_exit.o' 'linkgtk2.o' 'uigtk2.o' 'pixmaps.o' 'main.o' 'uitext.o' 'uicommon.o' 'strings.o' 'transport.o' 'recon.o' 'sortri.o' 'files.o' 'update.o' 'stasher.o' 'globals.o' 'copy.o' 'remote.o' 'xferhint.o' 'transfer.o' 'terminal.o' 'checksum.o' 'tree.o' 'common.o' 'clroot.o' 'lock.o' 'os.o' 'fileinfo.o' 'props.o' 'osx.o' 'abort.o' 'fingerprint.o' 'fspath.o' 'path.o' 'name.o' 'fileutil.o' 'uutil.o' 'pred.o' 'case.o' 'lwt/lwt_unix.o' 'lwt/lwt_util.o' 'lwt/lwt.o' 'lwt/pqueue.o' 'ubase/trace.o' 'ubase/prefs.o' 'ubase/uarg.o' 'ubase/rx.o' 'ubase/util.o' 'ubase/uprintf.o' 'ubase/safelist.o' 'ubase/myMap.o' 'ubase/projectInfo.o' '/usr/lib64/ocaml/lablgtk2/lablgtk.a' '/usr/lib64/ocaml/str.a' '/usr/lib64/ocaml/unix.a' '/usr/lib64/ocaml/stdlib.a'  '-Llwt' '-Lubase' '-L/usr/lib64/ocaml/lablgtk2' '-L/usr/lib64/ocaml' '-llablgtk2' '-lgtk-x11-2.0' '-lgdk-x11-2.0' '-latk-1.0' '-lgdk_pixbuf-2.0' '-lm' '-lpangocairo-1.0' '-lpango-1.0' '-lcairo' '-lgobject-2.0' '-lgmodule-2.0' '-ldl' '-lglib-2.0' '-lstr' '-lunix' '-lutil' 'osxsupport.o' 'pty.o' '/usr/lib64/ocaml/libasmrun.a' -lm  -ldl
pty.o: In function `c_openpty':
pty.c:(.text+0x17): undefined reference to `openpty'
collect2: ld returned 1 exit status
Error during linking
make: *** [unison] Error 2

!!! ERROR in net-misc/unison-2.17.1-r1:
!!! In src_compile at line 3108
!!! error making unsion
Comment 1 Santiago M. Mola (RETIRED) gentoo-dev 2007-08-17 20:40:10 UTC
Created attachment 128438 [details, diff]
unison-2.17.1-as-needed.patch

-lutil must be after pty.o
Comment 2 Craig Andrews gentoo-dev 2007-08-26 23:46:37 UTC
I just encountered the same problem on my ~amd64 system. Any idea when this may hit portage?
Comment 3 Craig Andrews gentoo-dev 2007-08-26 23:50:23 UTC
Oops, I forgot to mention that the patch fixed the problem.
Comment 4 Steven Elling 2007-09-12 04:03:20 UTC
I'm getting the exact same error with unison-2.13.16 and use "--as-needed", as well.  The particular machine I'm trying to rebuild unison on is running an amd64 install.

I removed "--as-needed" from my LDFLAGS but unison would still not compile.  I then stripped out all LDFLAGS I had in make.conf but unison would still not compile.  I also, stripped down my CFLAGS but got the same error.

I tried building unison-2.12.0-r1 but got the same results.

This patch did fix the problem for unison-2.13.16 and unison-2.17.1-r1, however, I don't think the cause of this is due to "--as-needed".
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2007-09-12 07:30:34 UTC
unison is written in ocaml. Try to rebuild ocaml without --as-needed and then build unison...
Comment 6 Alexis Ballier gentoo-dev 2007-09-23 09:38:42 UTC
*** Bug 193489 has been marked as a duplicate of this bug. ***
Comment 7 Alexis Ballier gentoo-dev 2008-01-27 15:06:31 UTC
applied for 2.27.57, please dont forget to send it upstream as it was still needed for that version
Comment 8 Santiago M. Mola (RETIRED) gentoo-dev 2008-01-27 15:25:02 UTC
dev-zero, maybe you want to send it upstream. I don't find an easy way to contact upstream and I don't even use unison.