LD Changes To Implicit DSO Linking Update

Mamoru Tasaka mtasaka at ioa.s.u-tokyo.ac.jp
Wed Feb 10 11:42:53 UTC 2010

Parag N(पराग़) wrote, at 02/10/2010 02:58 AM +9:00:
> On Tue, Feb 9, 2010 at 11:18 PM, Jakub Jelinek <jakub at redhat.com> wrote:
>> On Tue, Feb 09, 2010 at 11:09:50PM +0530, Parag N(पराग़) wrote:
>>>  Anyway I find adding missing DSO to CFLAGS in SPEC is easy solution for now.
>> They don't belong to CFLAGS, those are flags for compilation.  You want
>> LDFLAGS or even better add it in configure to LIBS.
>   I am not sure then what's wrong with my package. Here is how it
> failed http://koji.fedoraproject.org/koji/getfile?taskID=1970866&name=build.log

This build.log says:
/usr/bin/ld: keyevent.o: undefined reference to symbol 'XKeysymToString'
/usr/bin/ld: note: 'XKeysymToString' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
And actually src/keyevent.c reads:
   275      if (key_disable_overwrite) {
   276          key_event->keycode = -1;
   277          key_event->keysym = 0;
   278          g_print("Not allowed to overwrite KeyCode for %s",
   279                  XKeysymToString(keysym));
   280          return;
   281      }

You should add "AC_CHECK_LIB(X11, XKeysymToString)" to configure.in,
for example.

> and then modifying CFLAGS its successful build at
> http://kojipkgs.fedoraproject.org/packages/iok/1.3.9/1.fc13/data/logs/i686/build.log
> Parag.


More information about the devel mailing list