OpenWrt Forum Archive

Topic: gd failed to compile on SVN r18557

The content of this topic has been archived on 17 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I just upgraded my local OpenWRT SVN trunk to r18557, did a make distclean, and then started the compilation (after configuration - make menuconfig). At the stage of compiling gd-2.0.35 package, the compilation barfed with the following error messages:

mipsel-openwrt-linux-uclibc-gcc -shared  .libs/gd.o .libs/gdfx.o .libs/gd_security.o .libs/gd_gd.o .libs/gd_gd2.o .libs/gd_io.o .libs/gd_io_dp.o .libs/gd_gif_in.o .libs/gd_gif_out.o .libs/gd_io_file.o .libs/gd_io_ss.o .libs/gd_jpeg.o .libs/gd_png.o .libs/gd_ss.o .libs/gd_topal.o .libs/gd_wbmp.o .libs/gdcache.o .libs/gdfontg.o .libs/gdfontl.o .libs/gdfontmb.o .libs/gdfonts.o .libs/gdfontt.o .libs/gdft.o .libs/gdhelpers.o .libs/gdkanji.o .libs/gdtables.o .libs/gdxpm.o .libs/wbmp.o  -L/opt/tmp/openwrt-svn-trunk-WGT634U/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib -L/opt/tmp/openwrt-svn-trunk-WGT634U/staging_dir/target-mipsel_uClibc-0.9.30.1/lib -L/opt/tmp/openwrt-svn-trunk-WGT634U/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/opt/tmp/openwrt-svn-trunk-WGT634U/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/lib -ljpeg -lpng12 -lz -lm  -mips32 -mtune=mips32 -msoft-float @LTLIBICONV@ -Wl,-soname -Wl,libgd.so.2 -o .libs/libgd.so.2.0.0
mipsel-openwrt-linux-uclibc-gcc: @LTLIBICONV@: No such file or directory
make[5]: *** [libgd.la] Error 1
make[5]: Leaving directory `/opt/tmp/openwrt-svn-trunk-WGT634U/build_dir/target-mipsel_uClibc-0.9.30.1/gd-2.0.35'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/opt/tmp/openwrt-svn-trunk-WGT634U/build_dir/target-mipsel_uClibc-0.9.30.1/gd-2.0.35'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/tmp/openwrt-svn-trunk-WGT634U/build_dir/target-mipsel_uClibc-0.9.30.1/gd-2.0.35'
make[2]: *** [/opt/tmp/openwrt-svn-trunk-WGT634U/build_dir/target-mipsel_uClibc-0.9.30.1/gd-2.0.35/.built] Error 2
make[2]: Leaving directory `/opt/tmp/openwrt-svn-trunk-WGT634U/feeds/packages/libs/gd'
make[1]: *** [package/feeds/packages/gd/compile] Error 2
make[1]: Leaving directory `/opt/tmp/openwrt-svn-trunk-WGT634U'
make: *** [package/feeds/packages/gd/compile] Error 2

Looks like the compiler can determine what @LTLIBICONV@ variable is. Does anyone know how to fix this?

Fallout from https://dev.openwrt.org/ticket/6022, also noted in https://dev.openwrt.org/ticket/6241

Index: feeds/packages/libs/gd/Makefile
===================================================================
--- feeds/packages/libs/gd/Makefile     (revision 18587)
+++ feeds/packages/libs/gd/Makefile     (working copy)
@@ -47,6 +47,11 @@

 TARGET_CFLAGS += $(FPIC)

+define Build/Configure
+    ( cd $(PKG_BUILD_DIR); aclocal; libtoolize; autoreconf; );
+    $(call Build/Configure/Default)
+endef
+
 define Build/Compile
    $(MAKE) -C $(PKG_BUILD_DIR) \
        DESTDIR="$(PKG_INSTALL_DIR)" \

Make sure the leading whitespaces are tabs and not spaces.

(Last edited by swalker on 29 Nov 2009, 03:56)

Many thanks swalker and that fixed the compilation problem.

The discussion might have continued from here.