Notice: Comments you submit will be routed for moderation. If you have an account, please log in first.

Ticket #246 (closed defect: fixed)

Opened 2 years ago

Last modified 15 months ago

Build fails with --as-needed linker flag

Reported by: krissn@… Owned by: alwin
Priority: normal Milestone: not applicable
Component: All Version: 0.14.x
Severity: tweak Keywords: as-needed
Cc:

Description

When building 0.14.1 on Gentoo with LDFLAGS="-Wl,--as-needed" the compilation fails reporting a problem linking the libsvnqt.so library:

Linking CXX shared library ../../lib/libsvnqt.so
[ 44%] Building CXX object src/ksvnwidgets/CMakeFiles/ksvnwidgets.dir/authdlg.o
[ 44%] Building CXX object src/settings/CMakeFiles/settingsdlgs.dir/diffmergesettings.o
CMakeFiles/svnqt.dir/datetime.o: In function `svn::DateTime::SetRFC822Date(char const*)':
datetime.cpp:(.text+0x208): undefined reference to `apr_date_parse_rfc'
collect2: ld returned 1 exit status
make[2]: *** [lib/libsvnqt.so.4.0.0] Błąd 1
make[1]: *** [src/svnqt/CMakeFiles/svnqt.dir/all] Błąd 2
make[1]: *** Oczekiwanie na niezakończone zadania....

The problem appears when apr and apr-utils are linked with --as-needed. The linking command line first includes those libraries with their full LDFLAGS, but due to --as-needed behavior the linker discards them, causing the libraries not to be included in the list of finally required libraries.

The issue is tracked as bug #187318 on Gentoo Bugzilla ( http://bugs.gentoo.org/show_bug.cgi?id=187318)

The attached patch fixes the build in my case.

Attachments

kdesvn-0.14.1-as-needed.patch (1.4 KB) - added by krissn@… 2 years ago.
Proposed patch fixing the build
kdesvn-1.0.0-asneeded.patch (5.1 KB) - added by orion@… 18 months ago.
This is the patch I use in Fedora to build with the -Wl,--as-needed flag.
kdesvn-1.2.0-asneeded.patch (4.4 KB) - added by orion 16 months ago.
Current 1.2.0 as needed patch

Change History

Changed 2 years ago by krissn@…

Proposed patch fixing the build

Changed 2 years ago by alwin

  • status changed from new to assigned

Tnx!

Changed 18 months ago by orion@…

This is the patch I use in Fedora to build with the -Wl,--as-needed flag.

Changed 16 months ago by orion

Current 1.2.0 as needed patch

Changed 15 months ago by orion

  • status changed from assigned to closed
  • resolution set to fixed

Appears to be fixed in 1.2.2

Add/Change #246 (Build fails with --as-needed linker flag)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.

Ihr Browser versucht gerade eine Seite aus dem sogenannten Internet auszudrucken. Das Internet ist ein weltweites Netzwerk von Computern, das den Menschen ganz neue Möglichkeiten der Kommunikation bietet.

Da Politiker im Regelfall von neuen Dingen nichts verstehen, halten wir es für notwendig, sie davor zu schützen. Dies ist im beidseitigen Interesse, da unnötige Angstzustände bei Ihnen verhindert werden, ebenso wie es uns vor profilierungs- und machtsüchtigen Politikern schützt.

Sollten Sie der Meinung sein, dass Sie diese Internetseite dennoch sehen sollten, so können Sie jederzeit durch normalen Gebrauch eines Internetbrowsers darauf zugreifen. Dazu sind aber minimale Computerkenntnisse erforderlich. Sollten Sie diese nicht haben, vergessen Sie einfach dieses Internet und lassen uns in Ruhe.

Die Umgehung dieser Ausdrucksperre ist nach §95a UrhG verboten.

Mehr Informationen unter www.politiker-stopp.de.