On Wed, Apr 27, 2011 at 11:44:49AM +0200, David Sandberg wrote:
>  
> 
> -----Ursprüngliche Nachricht-----
> Von: David Sandberg [mailto:david_sandb...@alice-dsl.net] 
> Gesendet: Dienstag, 26. April 2011 22:25
> An: ''
> Betreff: Compiling on Fedora 13
> 
> I'd try to build netsurf like the documentation for Fedora with all the
> Dependencies build.
> It was not possible to compile the Source without Errors:
> 
> This is the result:
> 
> [root@Acer1 netsurf]# PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make
> TARGET=gtk
> M.CONFIG: JPEG (libjpeg)        enabled       (NETSURF_USE_JPEG := YES)
> M.CONFIG: JNG/MNG/PNG (libmng)  disabled      (NETSURF_USE_MNG := NO)
> M.CONFIG: PDF export (haru)     enabled       (NETSURF_USE_HARU_PDF := YES)
> M.CONFIG: glibc internal iconv  enabled       (NETSURF_USE_LIBICONV_PLUG :=
> YES)
> M.CONFIG: SVG (librsvg-2.0)     disabled      (NETSURF_USE_RSVG := NO)
> M.CONFIG: SVG (libsvgtiny)      disabled      (NETSURF_USE_NSSVG := NO)
> M.CONFIG: Sprite (librosprite)  auto-enabled  (NETSURF_USE_ROSPRITE :=
> AUTO)
> M.CONFIG: BMP (libnsbmp)        enabled       (NETSURF_USE_BMP := YES)
> M.CONFIG: GIF (libnsgif)        enabled       (NETSURF_USE_GIF := YES)
> M.CONFIG: PNG   (libpng)        enabled       (NETSURF_USE_PNG := YES)
> M.CONFIG: WebP (libwebp)        disabled      (NETSURF_USE_WEBP := NO)
> Use of uninitialized value $svninfo{"repositoryroot"} in length at
> utils/svn-testament.pl line 111.
> TESTMENT: unchanged
>     LINK: nsgtk
> /usr/bin/ld: build-Linux-gtk/gtk_dialogs_options.o: undefined reference to
> symbol 'lround@@GLIBC_2.1'
> /usr/bin/ld: note: 'lround@@GLIBC_2.1' is defined in DSO /lib/libm.so.6 so
> try adding it to the linker command line
> /lib/libm.so.6: could not read symbols: Invalid operation
> collect2: ld backs 1 as End-Status 
> make: *** [nsgtk] Error 1
> 
> 
> 
> Can someone help me. Probably a linker problem. Pleas give the syntax for
> the linker command line.

This is because glibc no longer automatically links teh math library
(libm) with the toolchain you are using. Very easy fix:

In the main Makefile around line 345

You will see:

# common libraries without pkg-config support
LDFLAGS += -lz 

change the LDFLAGS line to

LDFLAGS += -lz -lm

That should sort the link for you

The formal diff is

Index: Makefile
===================================================================
--- Makefile    (revision 12242)
+++ Makefile    (working copy)
@@ -343,7 +343,7 @@
 $(eval $(call feature_enabled,LIBICONV_PLUG,-DLIBICONV_PLUG,,glibc internal 
iconv))
 
 # common libraries without pkg-config support
-LDFLAGS += -lz
+LDFLAGS += -lz -lm
 
 CFLAGS += -DNETSURF_UA_FORMAT_STRING=\"$(NETSURF_UA_FORMAT_STRING)\"
 CFLAGS += -DNETSURF_HOMEPAGE=\"$(NETSURF_HOMEPAGE)\"


-- 
Regards Vincent
http://www.kyllikki.org/

Reply via email to