1832656 Members
3270 Online
110043 Solutions
New Discussion

Compile error

 
David_246
Trusted Contributor

Compile error

Hi,

I already had another question today about how to install GD::GRAPH::lines
As that issue can only be solved by the having gd installed, I chose to have a new question opened.

The problem is in compiling gd-2.0.12. I did install zlib and I did install libpng (in /usr/local).
Now when running cd /usr/local/gd-2.0.12/; ./configure --prefix=/usr/local it looks like it's ok, but when looking at the config.log file you see it didn't :

configure:10613: result: no
configure:10641: checking for XpmReadFileToXpmImage in -lXpm
configure:10672: gcc -o conftest -g -O2 -I/usr/local/include/libpng12 conftest.c -lXpm -lX11 -lm >&5
/usr/ccs/bin/ld: Can't find library: "Xpm"
collect2: ld returned 1 exit status
configure:10675: $? = 1
configure: failed program was:
| #line 10648 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME "GD"
| #define PACKAGE_TARNAME "gd"
| #define PACKAGE_VERSION "2.0.12"
| #define PACKAGE_STRING "GD 2.0.12"
| #define PACKAGE_BUGREPORT "gd@boutell.com"
| #define PACKAGE "gd"
| #define VERSION "2.0.12"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define STDC_HEADERS 1
| #define HAVE_ERRNO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ICONV 1
| #define ICONV_CONST
| #define HAVE_ICONV_H 1
| #define HAVE_ICONV_T_DEF 1
| #define HAVE_LIBM 1
| #define HAVE_PNG_H 1
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus

When running the "make install" I get the following error :

/usr/local/gd-2.0.12 3# make install
Making install in config
No suffix list.
No suffix list.
/bin/sh ../config/mkinstalldirs /usr/local/bin
../config/install-sh -c gdlib-config /usr/local/bin/gdlib-config
Making install in test
No suffix list.
No suffix list.
/bin/sh ./libtool --mode=link gcc -g -O2 -o gdparttopng gdparttopng.o ./libgd.la -lm
libtool: link: warning: this platform does not like uninstalled shared libraries
libtool: link: `gdparttopng' will be relinked during installation
gcc -g -O2 -o .libs/gdparttopng gdparttopng.o ./.libs/libgd.sl -lm -Wl,+b -Wl,/usr/local/gd-2.0.12/.libs:/usr/local/lib
/usr/ccs/bin/ld: Unsatisfied symbols:
gdImageCreateFromGd2Part (first referenced in gdparttopng.o) (code)
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

Anyone that could help me out ?

Regs David
@yourservice
9 REPLIES 9
Paula J Frazer-Campbell
Honored Contributor

Re: Compile error

David

Start here:-

/usr/ccs/bin/ld: Can't find library: "Xpm"

Do you have Xpm ?

Paula
If you can spell SysAdmin then you is one - anon
Bill Douglass
Esteemed Contributor

Re: Compile error

You've got gd configured to use XPM format images, but you don't have libXpm installed on your system.

You cand/l and install it from:

http://hpux.cs.utah.edu/hppd/hpux/X11/Graphics/xpm-3.4k/

This will put libXpm.sl and libXpm.a in /usr/local/lib on your system. Then re-run your config and make.
Umapathy S
Honored Contributor

Re: Compile error

I will try for the second!!!

Normally I get No suffix list when I use /usr/bin/make. With /usr/local/gmake I dont get these type of errors.

Did you use gnu make to compile these?

HTH
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
David_246
Trusted Contributor

Re: Compile error

Hi,

Thanks for your reply. I installed Xpm (as provided in the url), installed the gmake from Merijn's site. But still I even get the missing Xpm :(
And exact the same error again when compiling.

Why does it not recognize I have it installed ? (yes, officialy using swinstall and it succeeded correct)
When running ./configure it also will report in the end :

** Configuration summary for gd 2.0.12:

Support for PNG library: no
Support for JPEG library: no
Support for Freetype 2.x library: no
Support for Xpm library: no

Although Xpm and PNG is installed currently ?? Any last advise ?

Regs David
@yourservice
benoit Bruckert
Honored Contributor

Re: Compile error

hi,
You should specify the PATH to the lib.
2 ways :
1 - LD_LIBRARY_PATH, and add in this env variable the path to xpm and png libs.
2 - In the configure script .
Check with ./configure --help
and see if there's a with-xpm-dir=... or something like that (and also with png).
I already installed gd lib from sources, and if I remember i used the option 2...
hth
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Mehdi_1
Regular Advisor

Re: Compile error

Hi

You need to tell the configure the location of xpm headers and library:

Use this:

CPPFLAGS="-I/usr/local/include/X11" LDFLGES="-L/usr/local/lib/X11" ./configure

That should provide configure with path to Xpm library and header.


I hope that helps.


__Mehdi
Mehdi_1
Regular Advisor

Re: Compile error

Sorry, I meant:

CPPFLAGES="-I/usr/local/include/X11" -LDFLAGES="-L/usr/local/lib/X11" ./configure


All in one line.

__Mehdi
H.Merijn Brand (procura
Honored Contributor

Re: Compile error

All those GNU modules support $CONFIG_SITE, an environment variable that points to a file where your local settings are stored.

Mine looks like below(also attached) to give you an idea of what you could put in there. Note that $OSTYPE is set by tcsh, the shell of my choice

a5:/u/usr/merijn 108 > cat $CONFIG_SITE
# $CONFIG_SITE -> /pro/3gl/GNU/policy.sh

echo "OSTYPE: $OSTYPE, CC: $CC, CFLAGS: $CFLAGS, LDFLAGS: $LDFLAGS"
if [ $OSTYPE = hpux -a ${CC:-x} = x ]; then
CC=cc
# CFLAGS="-Ae -fast +Onolimit"
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
CFLAGS="-Ae +O2 +Onolimit $CFLAGS"
if [ $HOST = d3 ]; then
CFLAGS=$CFLAGS" +DAportable"
fi
elif [ $OSTYPE = aix -a ${CC:-x} = x ]; then
CC=cc
CFLAGS="-O2 -qmaxmem=204800"
elif [ $OSTYPE = osf1 ]; then
CC=cc
CFLAGS="-O2 -std"
elif [ ${CC:-x} = gcc -o ${CC:-x} = gcc32 -o ${CC:-x} = gcc64 ]; then
CFLAGS="-O4 $CFLAGS"
else
#CC=cc
CFLAGS=-O2
fi

if [ $OSTYPE = hpux -a ${CC:-x} = gcc64 ]; then
PATH="/usr/local/pa20_64:$PATH"
CC=gcc
CFLAGS=$CFLAGS" -mpa-risc-2-0"
LDFLAGS="-s -L/usr/lib/pa20_64 "$LDFLAGS
elif [ $OSTYPE = hpux -a ${CC:-x} = gcc ]; then
if [ $HOST = d3 -o `uname -r` = "B.10.20" ]; then
CFLAGS=$CFLAGS" -mpa-risc-1-1"
else
CFLAGS=$CFLAGS" -mpa-risc-2-0"
fi
fi

case "$CFLAGS:$CC" in
*DA2.0w*|*DD64*|*:gcc64) ;;
*) CFLAGS=$CFLAGS" -I/pro/local/include"
LDFLAGS=$LDFLAGS" -s -L/pro/local/lib"
esac

if [ "${USE_NCURSES:-}" = "YES" ]; then
CFLAGS=`echo "$CFLAGS -I." | sed -e 's,-I,-I/pro/local/include/ncurses -I,'
-e 's, -I.$,,'`
fi

if [ -d /usr/include/X11R6 ]; then
CFLAGS=$CFLAGS" -I/usr/include/X11R6"
fi
if [ -d /usr/lib/X11R6 ]; then
LDFLAGS=$LDFLAGS" -L/usr/lib/X11R6"
fi
echo "OSTYPE: $OSTYPE, CC: $CC, CFLAGS: $CFLAGS, LDFLAGS: $LDFLAGS"


Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
David_246
Trusted Contributor

Re: Compile error

Hi,

Sorry, but all your answers didn't work out for me. Maybe I should attend a course ones.
It's quiet anoying to not get it to work.

5 points for al previous answers. And a big thanks to all!

Best Regs David
@yourservice