You are not logged in.

#1 2009-09-28 04:47:49

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

[solved] New LDFLAGS default broke at least one AUR package for me

I'm not really sure what these LDFLAGs below do, but the jack-rack package in the AUR could not compile with them on, works just fine otherwise. These are the new defaults with the recent pacman update.

LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"

Last edited by ngoonee (2009-09-28 06:20:32)


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#2 2009-09-28 04:55:59

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Just add LDFLAGS="" in the PKGBUILD . CFLAGS & MAKEFLAGS break some packages too . It's not something new .


English is not my native language .

Offline

#3 2009-09-28 05:14:41

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: [solved] New LDFLAGS default broke at least one AUR package for me

I'm a bit surprised at the Arch devs decision to use --as-needed, myself.  While it provides the most benefits, it also is the most problematic (Gentoo has a metabug for all packages that --as-need breaks, BTW).  -O1 and --sort-common are both much more reliable optimizations.

Overall, I'd recommend that the default be LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu".  Yes, that's right, just one -Wl is needed if they are comma-separated.


Anyways, please don't use LDFLAGS="" or unset LDFLAGS, etc. in PKGBUILDs.  A much more elegant solution would be to filter out --as-needed using sed or something.

Offline

#4 2009-09-28 05:49:01

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,413
Website

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Most --as-needed bugs are fixed these day as that flag is widely used (I believe Fedora, Ubuntu & Gentoo).  The --as-needed flag is also awesome at reducing the number of rebuilds needed for a library soname bump, so fixing small numbers of cases where it does not work is preferable to me.
(Edit: also notice the nice patch used in our binutils package to fix many --as-needed issues...)

I actually did not think about --sort-common when talking about LDFLAGS and agree it would be useful.  Feel free to file a bug report requesting it.

and, this is the line you want in your PKGBUILD.

  export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"

Offline

#5 2009-09-28 06:19:03

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Thanks Allan, that works fine. Now to bug the maintainer of that package....


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-09-28 10:45:29

Beini
Member
From: Finland
Registered: 2007-06-06
Posts: 78

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Stepmania fails to find lua with the new LDFLAGS:

*** liblua is required to build StepMania; please make sure that
*** it is installed to continue the installation process.

That can be fixed with the filter Allan posted, but I found this gentoo bug report:

http://bugs.gentoo.org/show_bug.cgi?id=170224

That mentions it being a bug in lua. I'm not really competent enough to say where's the problem, so should this be reported as lua bug or should it be just filtered out from the AUR package?


archlinux x86_64 user || My PKGBUILDs

Offline

#7 2009-09-28 21:36:27

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Both, I say tongue  If the Gentoo bug says pretty conclusively that it's a bug, I would file upstream with Lua, and filter out as-needed in the meantime.

Last edited by Ranguvar (2009-09-28 21:37:02)

Offline

#8 2010-01-14 12:36:16

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Hi all,

I totally missed this thread!
I'm the maintainer of the jack-rack AUR package, and I got today a mail that it's not building properly.
However, I tried several times to build this package _without_ the "export LDFLAGS"-stuff and it built just fine. I added them to the PKGBUILD since some people seem to have this problem. But is this issue still up-to-date?

Offline

#9 2010-01-14 12:41:46

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Most probably, on update, you have not fixed your /etc/makepkg.conf to follow the new LDFLAGs? The issue is still the same.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#10 2010-01-15 12:48:34

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: [solved] New LDFLAGS default broke at least one AUR package for me

ngoonee wrote:

Most probably, on update, you have not fixed your /etc/makepkg.conf to follow the new LDFLAGs? The issue is still the same.

No, I didn't.
I still have no LDFLAGS set in my makepkg.conf. But I haven't noticed no drawbacks. Everything, including jack-rack, compiles just fine.
Is it recommended to set them, or is there another reason to do so?

Vlad

Offline

#11 2010-01-16 13:07:52

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Its set, as far as I know, so that the binary packages produced are smaller. Which is important when providing packages for the core, extra, community repos.

Thing is, the LDFLAGS which AREN'T set on your system ARE set on everyone else's. Because everyone else (which includes those using your package) updates pacman, sees a new /etc/makepkg.conf.pacnew, and replaces the old one.

For me, if you're maintaining an AUR package its best for your makepkg.conf to be vanilla except for optimizations, simply so you don't get these sort of problems.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#12 2010-01-16 23:29:05

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: [solved] New LDFLAGS default broke at least one AUR package for me

ngoonee wrote:

For me, if you're maintaining an AUR package its best for your makepkg.conf to be vanilla except for optimizations, simply so you don't get these sort of problems.

That´s a point.
Thanks

Offline

#13 2012-01-10 02:47:38

spijet
Member
Registered: 2012-01-10
Posts: 3

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Hi All,
I got an error compiling jack-rack (as well as jack-rack-git) from AUR. It seems that it's again caused by new LDFLAGS.

gcc -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14       -I/usr/include/alsa   -I/usr/include/libxml2   -DPKGDATADIR=\"/usr/share/jack-rack\" -DPIXMAPDIR=\"/usr/share/pixmaps\" -DDTDDIR=\"/usr/share/dtds\" -DG_DISABLE_DEPRECATED=1 -DGTK_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -DGDK_PIXBUF_DISABLE_DEPRECATED=1 -DGNOME_DISABLE_DEPRECATED=1 -march=native -mcx16 -msahf -O2 -pipe -fstack-protector -fomit-frame-pointer --param=ssp-buffer-size=4 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -D_FORTIFY_SOURCE=2 -ljack   -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0     -llrdf -lasound   -lxml2   -Wl,-O1,--sort-common,--hash-style=gnu -o jack-rack jack_rack-midi_window.o jack_rack-midi_control.o jack_rack-wet_dry_controls.o jack_rack-file.o jack_rack-midi.o jack_rack-util.o jack_rack-plugin_settings.o jack_rack-process.o jack_rack-plugin_desc.o jack_rack-plugin_mgr.o jack_rack-ui.o jack_rack-plugin.o jack_rack-port_controls.o jack_rack-plugin_slot.o jack_rack-jack_rack.o jack_rack-lock_free_fifo.o jack_rack-ui_callbacks.o jack_rack-plugin_slot_callbacks.o jack_rack-control_callbacks.o jack_rack-main.o  
/usr/bin/ld: jack_rack-plugin_mgr.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line
/lib/libdl.so.2: could not read symbols: Invalid operation
collect2: выполнение ld завершилось с кодом возврата 1
make[2]: *** [jack-rack] Ошибка 1
make[2]: Выход из каталога `/tmp/yaourt-tmp-spijet/aur-jack-rack-git/src/jack-rack-build/src'
make[1]: *** [all] Ошибка 2
make[1]: Выход из каталога `/tmp/yaourt-tmp-spijet/aur-jack-rack-git/src/jack-rack-build/src'
make: *** [all-recursive] Ошибка 1

How do I fix it?

Sorry for bumping an old thread.

Offline

#14 2012-01-10 02:51:35

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Bug the maintainer on the AUR page (or adjust the LDFLAGS yourself as indicated in this thread).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#15 2012-01-11 15:06:38

spijet
Member
Registered: 2012-01-10
Posts: 3

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Thanks for answer, ngoonee, but setting LDFLAGS to "-Wl,-O1,--sort-common,--hash-style=gnu" didn't help, I still get the same error.
Already wrote DonVla about the problem.

Offline

#16 2012-01-12 01:17:04

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [solved] New LDFLAGS default broke at least one AUR package for me

Build with LDFLAGS+=' -ljack'. The error is telling you that the buildsystem is trying to get away with transitive linking through some other library. That doesn't fly anymore (as of binutils 2.22). Your problem is unrelated to the OP.

Offline

Board footer

Powered by FluxBB