Comments (3)
I can reproduce indeed a link failure during libmypaint-gegl introspection with ld.gold and the link option --as-needed.
By the way binutils-config
does not exist on my machine. I assume that's a distribution specific tool. It seems that the equivalent standard way to change the linker would be with CFLAGS="-fuse-ld=gold", right?
Anyway I get a similar error except that the undefined symbol is mypaint_surface_ref
here:
/home/jehan/dev/build/libmypaint/gegl/tmp-introspect9pXA2W/.libs/MyPaintGegl-1.3: symbol lookup error: /home/jehan/dev/build/libmypaint/gegl/.libs/libmypaint-gegl.so.0: undefined symbol: mypaint_surface_ref
Now I could not understand the source cause. I tried to play with the options of the command that make
is running but did not find what is wrong. Also I am far from being an introspection expert so I don't get all the details of what does this g-ir-scanner
command line which breaks (to be run from the gegl/
subdir):
CC="gcc" CFLAGS="-D_POSIX_C_SOURCE=200809L -fuse-ld=gold" LDFLAGS="-Wl,--as-needed -lm" CPPFLAGS="" CXXFLAGS="" /usr/bin/g-ir-scanner --warn-all --pkg="gegl-0.3" --pkg="glib-2.0" --namespace="MyPaintGegl" --nsversion="1.3" --identifier-prefix="MyPaintGegl" --symbol-prefix="mypaint_gegl" --add-include-path="/path/to/src/libmypaint/gegl/.." --add-include-path="/path/to/src/libmypaint/gegl" --add-include-path="./.." --add-include-path="
/usr/bin/pkg-config --define-variable=datadir="/usr/local/share" --variable=girdir gobject-introspection-1.0
" --namespace=MyPaintGegl --nsversion=1.3 --libtool="/bin/sh ../libtool" --include=GObject-2.0 --include=MyPaint-1.3 --include=Gegl-0.3 --library=libmypaint-gegl.la --library=../libmypaint.la --cflags-begin -I.. -I/path/to/src/libmypaint -I. -I.. -lmypaint --cflags-end /path/to/src/libmypaint/gegl/../glib/mypaint-gegl-glib.h /path/to/src/libmypaint/gegl/mypaint-gegl-surface.h /path/to/src/libmypaint/gegl/../glib/mypaint-gegl-glib.c /path/to/src/libmypaint/gegl/mypaint-gegl-surface.c libmypaint-gegl.la ../libmypaint.la Makefile --output MyPaintGegl-1.3.gir
As soon as you remove "-fuse-ld=gold" or "Wl,--as-needed", it works. So basically if anyone figures out how to run this command successfully with these 2 options, we should be able to fix the Makefile. I spent 30 min on it and did not find any solution.
Also it may simply be a bug in ld.gold. On the web I found similar issues:
https://bugs.archlinux.org/task/40515
from libmypaint.
By the way
binutils-config
does not exist on my machine. I assume that's a distribution specific tool. It seems that the equivalent standard way to change the linker would be with CFLAGS="-fuse-ld=gold", right?
-fuse-ld=gold
didn't work for me when I tried it first but it seems I can confirm now that
# ./configure CFLAGS="-fuse-ld=gold" LDFLAGS="-Wl,--as-needed" --enable-introspection --enable-gegl
# make clean all
works to trigger the bug.
Also it may simply be a bug in ld.gold. On the web I found similar issues:
https://bugs.archlinux.org/task/40515
Maybe.
What I don't get is why despite line
libmypaint_gegl_la_LIBS = $(GEGL_LIBS)
or
libmypaint_gegl_la_LIBS = $(GEGL_LIBS) ../libmypaint.la
in gegl/Makefile.am
, file gegl/.libs/libmypaint-gegl.so
does not end up being linked against GEGL or libmypaint, not without gold, not without as-needed, never. Why? See:
# ./configure --enable-introspection --enable-gegl && make clean all
[..]
# lddtree gegl/.libs/libmypaint-gegl.so
libmypaint-gegl.so => gegl/.libs/libmypaint-gegl.so (interpreter => none)
libm.so.6 => /lib64/libm.so.6
ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
libpthread.so.0 => /lib64/libpthread.so.0
libc.so.6 => /lib64/libc.so.6
That case doesn't error out though.
from libmypaint.
Closed by 94f059d.
from libmypaint.
Related Issues (20)
- GPU driven optimization HOT 5
- minimal.c broken in branch libmypaint-v1.5.x HOT 2
- Tag for 2.0 release HOT 1
- Upgrading from 1.4 to 1.5, results of `minimal.c` changed. HOT 5
- Are all of the "2" structs/functions safe to use? HOT 2
- Building via MSYS2 on Windows is broken in v.1.5.1 HOT 3
- Consider cleaning up doc/Doxyfile HOT 1
- Brush sampling skipping cause brush to restart in undo stack HOT 3
- libmypaint has version string in lib name HOT 6
- Gobject introspection file also bumps version string under major.minor versioning scheme HOT 4
- Dynamic brush with tapers [new feature idea] HOT 2
- libmypaint fails to reconfigure with autoconf 2.70 HOT 13
- 1.6.1: build fails HOT 1
- hangs in stroke_to, triggered by large coordinates with some settings.
- Spectrum mixing speed up by direct mixing colours that are close enough HOT 7
- how to make it to android? HOT 1
- #include "config.h" not found HOT 1
- possible issue in mix_colors (helpers.c)
- ImportError: cannot import name _mypaintlib HOT 1
- no libmypaint-2.0 on MINGW2 ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmypaint.