All of lore.kernel.org
 help / color / mirror / Atom feed
* Build fails due to wrong placement of -llibrary options
@ 2010-08-28 12:23 Christian Franke
  2010-08-28 13:23 ` BVK Chaitanya
  2010-08-28 13:35 ` BVK Chaitanya
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Franke @ 2010-08-28 12:23 UTC (permalink / raw)
  To: grub-devel

I'm trying to fix the build on Cygwin after the recent move to the new 
autogen/automake build system.

There is one Cygwin independent issue found so far:

$ make
[...]
gcc [...] -lintl -o grub-bin2h.exe util/grub_bin2h-bin2h.o libgrub.a
libgrub.a(...): undefined reference to `_libintl_gettext'
[...]

Workaround:

$ make LIBS=-lintl
[...]
gcc [...] -lintl -o grub-bin2h.exe util/grub_bin2h-bin2h.o libgrub.a -lintl


The placement of -llibrary options matter because the linker searches 
libraries and objects in the order specified.

$ grep ^grub_bin2h_LD Makefile
grub_bin2h_LDADD = libgrub.a
grub_bin2h_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM) $(LIBINTL) 
$(LIBDEVMAPPER)

The above should be:
grub_bin2h_LDADD = libgrub.a $(LIBINTL) $(LIBDEVMAPPER)
grub_bin2h_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)

Same for all other utils. This likely needs to be fixed in gentpl.py.


-- 
Regards,
Christian Franke



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-28 19:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-28 12:23 Build fails due to wrong placement of -llibrary options Christian Franke
2010-08-28 13:23 ` BVK Chaitanya
2010-08-28 13:35 ` BVK Chaitanya
2010-08-28 19:02   ` Christian Franke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.