summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-November/009861.html
blob: 16eb82de8029384a38735af2fe0d821d2c756724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] %ldflags, a shared library (xchat-plugin)
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%25ldflags%2C%20a%20shared%20library%20%28xchat-plugin%29&In-Reply-To=%3C4ED31137.3090106%40gmx.com%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="009860.html">
   <LINK REL="Next"  HREF="009863.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] %ldflags, a shared library (xchat-plugin)</H1>
    <B>Kamil Rytarowski</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%25ldflags%2C%20a%20shared%20library%20%28xchat-plugin%29&In-Reply-To=%3C4ED31137.3090106%40gmx.com%3E"
       TITLE="[Mageia-dev] %ldflags, a shared library (xchat-plugin)">n54 at gmx.com
       </A><BR>
    <I>Mon Nov 28 05:42:31 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="009860.html">[Mageia-dev] [packages-commits] [155556] update to 1.0.0.RELEASE
</A></li>
        <LI>Next message: <A HREF="009863.html">[Mageia-dev] %ldflags, a shared library (xchat-plugin)
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#9861">[ date ]</a>
              <a href="thread.html#9861">[ thread ]</a>
              <a href="subject.html#9861">[ subject ]</a>
              <a href="author.html#9861">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>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 <A HREF="http://xchat.org/docs/plugin20.html#intro">http://xchat.org/docs/plugin20.html#intro</A> 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)?
</PRE>















<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="009860.html">[Mageia-dev] [packages-commits] [155556] update to 1.0.0.RELEASE
</A></li>
	<LI>Next message: <A HREF="009863.html">[Mageia-dev] %ldflags, a shared library (xchat-plugin)
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#9861">[ date ]</a>
              <a href="thread.html#9861">[ thread ]</a>
              <a href="subject.html#9861">[ subject ]</a>
              <a href="author.html#9861">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>