From 1be510f9529cb082f802408b472a77d074b394c0 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 14 Apr 2013 13:46:12 +0000 Subject: Add zarb MLs html archives --- zarb-ml/mageia-dev/2011-November/009861.html | 102 +++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 zarb-ml/mageia-dev/2011-November/009861.html (limited to 'zarb-ml/mageia-dev/2011-November/009861.html') diff --git a/zarb-ml/mageia-dev/2011-November/009861.html b/zarb-ml/mageia-dev/2011-November/009861.html new file mode 100644 index 000000000..16eb82de8 --- /dev/null +++ b/zarb-ml/mageia-dev/2011-November/009861.html @@ -0,0 +1,102 @@ + + + + [Mageia-dev] %ldflags, a shared library (xchat-plugin) + + + + + + + + + +

[Mageia-dev] %ldflags, a shared library (xchat-plugin)

+ Kamil Rytarowski + n54 at gmx.com +
+ Mon Nov 28 05:42:31 CET 2011 +

+
+ +
Hello!
+
+I am working with drakcowsay and I want to fix the warning:
+*** WARNING: No build ID note found in 
+(...)/drakcowsay/BUILDROOT/drakcowsay-0.7-7.mga1.x86_64/usr/lib64/xchat/plugins/xchat-drakcowsay.so
+
+This page http://xchat.org/docs/plugin20.html#intro says:
+Most UNIX systems:
+     gcc -Wl,--export-dynamic -Wall -O1 -shared -fPIC myplugin.c -o 
+myplugin.so
+In our .spec we have:
+     gcc -Wl,--export-dynamic -Wall -O1 -shared -fPIC -I. 
+xchat-%{name}.c -o xchat-%{name}.so
+
+When I try to add %ldflags to it, it gives an error:
+/tmp/cc5a8dDh.o: In function `drakcowsay_timeout_cb':
+xchat-drakcowsay.c:(.text+0x60): undefined reference to `xchat_commandf'
+xchat-drakcowsay.c:(.text+0xcd): undefined reference to `xchat_commandf'
+/tmp/cc5a8dDh.o: In function `xchat_plugin_init':
+xchat-drakcowsay.c:(.text+0x1ed): undefined reference to `xchat_hook_timer'
+xchat-drakcowsay.c:(.text+0x200): undefined reference to `xchat_print'
+/tmp/cc5a8dDh.o: In function `xchat_plugin_deinit':
+xchat-drakcowsay.c:(.text+0x24c): undefined reference to `xchat_print'
+collect2: ld returned 1 exit status
+
+So I've extracted the parameters for gcc from %ldflags and removed 
+-Wl,--no-undefined.
+The current line is:
+      gcc -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 
+-Wl,--build-id -Wl,--enable-new-dtags -Wl,--export-dynamic -Wall -O1 
+-shared -fPIC -I. xchat-drakcowsay.c -o xchat-drakcowsay.so
+
+Is it right (for a shared library/ plugin)?
+
+ + + + + + + + + + + + + + + + +
+

+ +
+More information about the Mageia-dev +mailing list
+ -- cgit v1.2.1