pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build error in graphics/librsvg



On Sun 08 Jul 2012 at 15:59:12 +0200, Thomas Klausner wrote:
> I think this has been reported before and the issue is a missing '-fPIC'.
> Can you try adding that to LDFLAGS and report back if it improves the
> situation?

I this (pkgsrc Makefile) to add it,

CONFIGURE_ENV+=        AM_CFLAGS=-fPIC
BUILD_ENV+=            AM_CFLAGS=-fPIC

and it seems that even though the option was does propagate to AM_CFLAGS
in the Makefile in the work directory, and it didn't work.

This is in
pkg_comp/obj/pkgsrc/graphics/librsvg/default/librsvg-2.36.1/Makefile.am:

librsvg_@RSVG_API_MAJOR_VERSION@_la_CFLAGS = \
        $(LIBRSVG_CFLAGS)       \
        $(AM_CFLAGS)

and this in the resulting Makefile:

librsvg_2_la-rsvg-io.lo: rsvg-io.c
        $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS)
        $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES)
        $(INCLUDES) $(librsvg_2_la_CPPFLAGS) $(CPPFLAGS)
        $(librsvg_2_la_CFLAGS) $(CFLAGS) -MT librsvg_2_la-rsvg-io.lo -MD
        -MP -MF $(DEPDIR)/librsvg_2_la-rsvg-io.Tpo -c -o
        librsvg_2_la-rsvg-io.lo `test -f 'rsvg-io.c' || echo
        '$(srcdir)/'`rsvg-io.c

so it ought to propagate.

However, I see that LIBTOOL is used, and that should know how to make
shared libraries too. In fact, -fPIC -DPIC is seen in the .work.log
file, even if I don't edit the original Makefile, but not on all commands:

no PIC  [*] /pkg_comp/obj/pkgsrc/graphics/librsvg/default/.wrapper/bin/libtool 
/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.wrapper/bin/libtool --silent 
--tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I. 
-DG_LOG_DOMAIN=\"librsvg\" -DLIBRSVG_DATADIR=\"/usr/pkg/share\" 
-DRSVG_DISABLE_DEPRECATION_WARNINGS -I/usr/pkg/include -I/usr/include 
-I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -pthread -D_REENTRANT 
-I/usr/pkg/include/gdk-pixbuf-2.0 -I/usr/pkg/include/libpng15 
-I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include 
-I/usr/pkg/include -I/usr/pkg/include/libxml2 -I/usr/pkg/include/pango-1.0 
-I/usr/pkg/include/cairo -I/usr/pkg/include/pixman-1 -I/usr/X11R7/include 
-I/usr/X11R7/include/freetype2 -I/usr/pkg/include/libcroco-0.6 -Wall -Wextra 
-Wunused -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts 
-Wparentheses -Winline -Wredundant-decls -Wformat-nonliteral -Wsign-compare 
-Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Waggregate-return 
-Wcast-align -Wimplicit -Wuninitialized -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -Wpacked -Wmissing-format-attribute 
-Wshadow -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations 
-Wdeclaration-after-statement -Wold-style-definition 
-Wno-missing-field-initializers -Wno-unused-parameter -Wunused-variable 
-Wunused-function -Wno-switch-enum -fno-common -O2 -I/usr/pkg/include 
-I/usr/include -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -MT 
librsvg_2_la-rsvg-io.lo -MD -MP -MF .deps/librsvg_2_la-rsvg-io.Tpo -c -o 
librsvg_2_la-rsvg-io.lo rsvg-io.c
no PIC  <.> /usr/pkg/bin/libtool --silent --tag=CC --mode=compile cc 
-DHAVE_CONFIG_H -I. -DG_LOG_DOMAIN=\"librsvg\" 
-DLIBRSVG_DATADIR=\"/usr/pkg/share\" -DRSVG_DISABLE_DEPRECATION_WARNINGS 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include/freetype2
 -pthread -D_REENTRANT 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/gdk-pixbuf-2.0
 -I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libpng15 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/glib/glib-2.0
 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libxml2 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pango-1.0 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/cairo 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pixman-1 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libcroco-0.6 
-Wall -Wextra -Wunused -Wreturn-type -Wswitch -Wcomment -Wtrigraphs 
-Wchar-subscripts -Wparentheses -Winline -Wredundant-decls -Wformat-nonliteral 
-Wsign-compare -Wpointer-arith -Wwrite-strings -Wstrict-prototypes 
-Waggregate-return -Wcast-align -Wimplicit -Wuninitialized -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -Wpacked -Wmissing-format-attribute 
-Wshadow -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations 
-Wdeclaration-after-statement -Wold-style-definition 
-Wno-missing-field-initializers -Wno-unused-parameter -Wunused-variable 
-Wunused-function -Wno-switch-enum -fno-common -O2 -MT librsvg_2_la-rsvg-io.lo 
-MD -MP -MF .deps/librsvg_2_la-rsvg-io.Tpo -c -o librsvg_2_la-rsvg-io.lo 
rsvg-io.c 
PIC     [*] /pkg_comp/obj/pkgsrc/graphics/librsvg/default/.wrapper/bin/cc 
/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.wrapper/bin/cc -DHAVE_CONFIG_H 
-I. -DG_LOG_DOMAIN=\"librsvg\" -DLIBRSVG_DATADIR=\"/usr/pkg/share\" 
-DRSVG_DISABLE_DEPRECATION_WARNINGS 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include/freetype2
 -pthread -D_REENTRANT 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/gdk-pixbuf-2.0
 -I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libpng15 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/glib/glib-2.0
 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libxml2 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pango-1.0 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/cairo 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pixman-1 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libcroco-0.6 
-Wall -Wextra -Wunused -Wreturn-type -Wswitch -Wcomment -Wtrigraphs 
-Wchar-subscripts -Wparentheses -Winline -Wredundant-decls -Wformat-nonliteral 
-Wsign-compare -Wpointer-arith -Wwrite-strings -Wstrict-prototypes 
-Waggregate-return -Wcast-align -Wimplicit -Wuninitialized -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -Wpacked -Wmissing-format-attribute 
-Wshadow -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations 
-Wdeclaration-after-statement -Wold-style-definition 
-Wno-missing-field-initializers -Wno-unused-parameter -Wunused-variable 
-Wunused-function -Wno-switch-enum -fno-common -O2 -MT librsvg_2_la-rsvg-io.lo 
-MD -MP -MF .deps/librsvg_2_la-rsvg-io.Tpo -c rsvg-io.c -fPIC -DPIC -o 
.libs/librsvg_2_la-rsvg-io.o
        WARNING: [transform-gcc] passing unknown option -Wcomment
        WARNING: [transform-gcc] passing unknown option -Wtrigraphs
        WARNING: [transform-gcc] passing unknown option -Winline
        WARNING: [transform-gcc] passing unknown option -Wredundant-decls
        WARNING: [transform-gcc] passing unknown option -Waggregate-return
        WARNING: [transform-gcc] passing unknown option -Wimplicit
        WARNING: [transform-gcc] passing unknown option -Wuninitialized
        WARNING: [transform-gcc] passing unknown option -Wpacked
        WARNING: [transform-gcc] passing unknown option -Wstrict-aliasing=2
        WARNING: [transform-gcc] passing unknown option -Winit-self
        WARNING: [transform-gcc] passing unknown option 
-Wunsafe-loop-optimizations
        WARNING: [transform-gcc] passing unknown option 
-Wdeclaration-after-statement
        WARNING: [transform-gcc] passing unknown option -Wold-style-definition
        WARNING: [transform-gcc] passing unknown option 
-Wno-missing-field-initializers
        WARNING: [transform-gcc] passing unknown option -Wunused-variable
        WARNING: [transform-gcc] passing unknown option -Wunused-function
        WARNING: [transform-gcc] passing unknown option -Wno-switch-enum
PIC     <.> /pkg_comp/obj/pkgsrc/graphics/librsvg/default/.gcc/bin/gcc 
-DHAVE_CONFIG_H -I. -DG_LOG_DOMAIN=\"librsvg\" 
-DLIBRSVG_DATADIR=\"/usr/pkg/share\" -DRSVG_DISABLE_DEPRECATION_WARNINGS 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include/freetype2
 -pthread -D_REENTRANT 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/gdk-pixbuf-2.0
 -I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libpng15 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/glib/glib-2.0
 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libxml2 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pango-1.0 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/cairo 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pixman-1 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libcroco-0.6 
-Wall -Wextra -Wunused -Wreturn-type -Wswitch -Wcomment -Wtrigraphs 
-Wchar-subscripts -Wparentheses -Winline -Wredundant-decls -Wformat-nonliteral 
-Wsign-compare -Wpointer-arith -Wwrite-strings -Wstrict-prototypes 
-Waggregate-return -Wcast-align -Wimplicit -Wuninitialized -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -Wpacked -Wmissing-format-attribute 
-Wshadow -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations 
-Wdeclaration-after-statement -Wold-style-definition 
-Wno-missing-field-initializers -Wno-unused-parameter -Wunused-variable 
-Wunused-function -Wno-switch-enum -fno-common -O2 -MT librsvg_2_la-rsvg-io.lo 
-MD -MP -MF .deps/librsvg_2_la-rsvg-io.Tpo -c rsvg-io.c -fPIC -DPIC -o 
.libs/librsvg_2_la-rsvg-io.o 
-L/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib 
no PIC  [*] /pkg_comp/obj/pkgsrc/graphics/librsvg/default/.wrapper/bin/cc 
/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.wrapper/bin/cc -DHAVE_CONFIG_H 
-I. -DG_LOG_DOMAIN=\"librsvg\" -DLIBRSVG_DATADIR=\"/usr/pkg/share\" 
-DRSVG_DISABLE_DEPRECATION_WARNINGS 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include/freetype2
 -pthread -D_REENTRANT 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/gdk-pixbuf-2.0
 -I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libpng15 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/glib/glib-2.0
 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libxml2 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pango-1.0 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/cairo 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pixman-1 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libcroco-0.6 
-Wall -Wextra -Wunused -Wreturn-type -Wswitch -Wcomment -Wtrigraphs 
-Wchar-subscripts -Wparentheses -Winline -Wredundant-decls -Wformat-nonliteral 
-Wsign-compare -Wpointer-arith -Wwrite-strings -Wstrict-prototypes 
-Waggregate-return -Wcast-align -Wimplicit -Wuninitialized -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -Wpacked -Wmissing-format-attribute 
-Wshadow -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations 
-Wdeclaration-after-statement -Wold-style-definition 
-Wno-missing-field-initializers -Wno-unused-parameter -Wunused-variable 
-Wunused-function -Wno-switch-enum -fno-common -O2 -MT librsvg_2_la-rsvg-io.lo 
-MD -MP -MF .deps/librsvg_2_la-rsvg-io.Tpo -c rsvg-io.c -o 
librsvg_2_la-rsvg-io.o
        WARNING: [transform-gcc] passing unknown option -Wcomment
        WARNING: [transform-gcc] passing unknown option -Wtrigraphs
        WARNING: [transform-gcc] passing unknown option -Winline
        WARNING: [transform-gcc] passing unknown option -Wredundant-decls
        WARNING: [transform-gcc] passing unknown option -Waggregate-return
        WARNING: [transform-gcc] passing unknown option -Wimplicit
        WARNING: [transform-gcc] passing unknown option -Wuninitialized
        WARNING: [transform-gcc] passing unknown option -Wpacked
        WARNING: [transform-gcc] passing unknown option -Wstrict-aliasing=2
        WARNING: [transform-gcc] passing unknown option -Winit-self
        WARNING: [transform-gcc] passing unknown option 
-Wunsafe-loop-optimizations
        WARNING: [transform-gcc] passing unknown option 
-Wdeclaration-after-statement
        WARNING: [transform-gcc] passing unknown option -Wold-style-definition
        WARNING: [transform-gcc] passing unknown option 
-Wno-missing-field-initializers
        WARNING: [transform-gcc] passing unknown option -Wunused-variable
        WARNING: [transform-gcc] passing unknown option -Wunused-function
        WARNING: [transform-gcc] passing unknown option -Wno-switch-enum
no PIC  <.> /pkg_comp/obj/pkgsrc/graphics/librsvg/default/.gcc/bin/gcc 
-DHAVE_CONFIG_H -I. -DG_LOG_DOMAIN=\"librsvg\" 
-DLIBRSVG_DATADIR=\"/usr/pkg/share\" -DRSVG_DISABLE_DEPRECATION_WARNINGS 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.x11-buildlink/include/freetype2
 -pthread -D_REENTRANT 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/gdk-pixbuf-2.0
 -I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libpng15 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/glib/glib-2.0
 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib/glib-2.0/include 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libxml2 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pango-1.0 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/cairo 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/pixman-1 
-I/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/include/libcroco-0.6 
-Wall -Wextra -Wunused -Wreturn-type -Wswitch -Wcomment -Wtrigraphs 
-Wchar-subscripts -Wparentheses -Winline -Wredundant-decls -Wformat-nonliteral 
-Wsign-compare -Wpointer-arith -Wwrite-strings -Wstrict-prototypes 
-Waggregate-return -Wcast-align -Wimplicit -Wuninitialized -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -Wpacked -Wmissing-format-attribute 
-Wshadow -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations 
-Wdeclaration-after-statement -Wold-style-definition 
-Wno-missing-field-initializers -Wno-unused-parameter -Wunused-variable 
-Wunused-function -Wno-switch-enum -fno-common -O2 -MT librsvg_2_la-rsvg-io.lo 
-MD -MP -MF .deps/librsvg_2_la-rsvg-io.Tpo -c rsvg-io.c -o 
librsvg_2_la-rsvg-io.o 
-L/pkg_comp/obj/pkgsrc/graphics/librsvg/default/.buildlink/lib 

I'm not sure yet what to make of this.

>  Thomas
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor


Home | Main Index | Thread Index | Old Index