PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : cofigure parameter



echo
20.03.06, 09:12
Hi,
ich bin dabei mrtg zu compiliren. dazu musste ich im vorfeld einige libs übersetzen und diese wiederrum habe ich unter einem bestimmten verzeichniss gesteckt um sie einfacher zu packetieren.

nun meine frage, weiß jemand wie man dem configure befehl mitteilt, er solle in verschiedenen pfaden nach seinen libs suchen?



./configure --prefix=/opt/mrtg/gd --x-includes=/opt/mrtg/zlib/include:/opt/mrtg/libpng/include --x-libraries=/opt/mrtg/zlib/lib:/opt/mrtg/libpng/lib


scheint nicht zu funktionieren



./configure --prefix=/opt/mrtg/gd --x-includes=/opt/mrtg/zlib/include --x-includes=/opt/mrtg/libpng/include --x-libraries=/opt/mrtg/zlib/lib --x-libraries=/opt/mrtg/libpng/lib


mag er auch nicht (hier nimmt er immer nur die letzere der beiden Optionen).
eine idee???

mima
20.03.06, 09:26
Hallo echo,

was spricht gegen:
./configure --help
...
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PA...
--with-gd=DIR location of the gd lib/inc
--with-gd-lib=DIR location of the gd library
--with-gd-inc=DIR location of the gd include files
--with-z=DIR location of zlib lib/inc
--with-z-lib=DIR location of zlib library
--with-z-inc=DIR location of the zlib include files
--with-png=DIR location of png lib/inc
--with-png-lib=DIR location of png library
--with-png-inc=DIR location of the libpng include files
....


Gruß mima

echo
20.03.06, 09:41
hi,
danke für deinen rat, aber ich bin noch dabei die lib gd zu übersetzen, die bietet leider nicht den genannten funktionsraum.

Habs nun so versucht und sieht gut aus :)



./configure --prefix=/opt/mrtg/gd --x-includes=/opt/mrtg/zlib/include --x-libraries=/opt/mrtg/zlib/lib --with-png=/opt/mrtg/libpng/


generell würde ich jedoch gerne wissen, wie man bei configure mehrere pfade einem parameter mitgibt. jemand eine idee???

echo
20.03.06, 09:52
es klappt leider nicht, nach dem make-aufruf bricht der compiler-lauf ab. entweder findet er die png.h nicht oder die hader-datei von zlib und das obwohl configure meinte sie gefunden zu haben.

jemand ne idee wie ich dem gd mitteile das meine zlib unter "/opt/mrtg/zlib" und meine libpng unter "/opt/mrtg/libpng" zu finden ist?


hier mal der output von "configure --help"


./configure --help
`configure' configures GD 2.0.33 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']

Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]

Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names

X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR

System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]

Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-shared=PKGS build shared libraries default=yes
--enable-static=PKGS build static libraries default=yes
--enable-fast-install=PKGS optimize for fast installation default=yes
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-rpath do not hardcode runtime library paths

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-pic try to use only PIC/non-PIC objects default=use both
--with-x use the X Window System
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--with-png=DIR where to find the png library
--with-freetype=DIR where to find the freetype 2.x library
--with-fontconfig=DIR where to find the fontconfig library
--with-jpeg=DIR where to find the jpeg library
--with-xpm=DIR where to find the xpm library

Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <gd@boutell.com>.

drcux
20.03.06, 10:09
Wenn configure durchläuft, kannst du die Libs mit LDFLAGS übergeben:

LDFLAGS="-L/opt/blah -L/opt/blub -L/opt/nochwas" make

bzw Includes mit CPPFLAGS

tobiast
20.03.06, 10:10
CFLAGS="-I/opt/mrtg/zlib/include -L/opt/mrtg/zlib/lib" ./configure

echo
20.03.06, 10:24
Wenn configure durchläuft, kannst du die Libs mit LDFLAGS übergeben:

LDFLAGS="-L/opt/blah -L/opt/blub -L/opt/nochwas" make

bzw Includes mit CPPFLAGS


leider bricht er dabei ab... wobei ich ";" gesetzt haben, zwischen den variablen...



./configure --prefix=/opt/mrtg/gd && LDFLAGS="-L/opt/mrtg/zlib/lib -L/opt/mrtg/libpng/lib"; CPPFLAGS="-L/opt/mrtg/zlib/include -L /opt/mrtg/libpng/include"; make
creating libgd.la
(cd .libs && rm -f libgd.la && ln -s ../libgd.la libgd.la)
source='annotate.c' object='annotate.o' libtool=no \
DEPDIR=.deps depmode=hp /bin/sh ./config/depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I. -g -c annotate.c
/bin/sh ./libtool --mode=link cc -g -o annotate annotate.o ./libgd.la -lm
libtool: link: warning: this platform does not like uninstalled shared libraries
libtool: link: `annotate' will be relinked during installation
cc -g -o .libs/annotate annotate.o ./.libs/libgd.sl -lm -Wl,+b -Wl,/compile/source/mrtg/gd-2.0.33/.libs:/opt/mrtg/gd/lib
creating annotate
source='gdparttopng.c' object='gdparttopng.o' libtool=no \
DEPDIR=.deps depmode=hp /bin/sh ./config/depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I. -g -c gdparttopng.c
/bin/sh ./libtool --mode=link cc -g -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
cc -g -o .libs/gdparttopng gdparttopng.o ./.libs/libgd.sl -lm -Wl,+b -Wl,/compile/source/mrtg/gd-2.0.33/.libs:/opt/mrtg/gd/lib
/usr/ccs/bin/ld: Unsatisfied symbols:
gdImageCreateFromGd2Part (first referenced in gdparttopng.o) (code)
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

echo
20.03.06, 10:27
CFLAGS="-I/opt/mrtg/zlib/include -L/opt/mrtg/zlib/lib" ./configure

dies scheint gut zu funktionieren,



CFLAGS="-I/opt/mrtg/zlib/include -I/opt/mrtg/libpng/include -L/opt/mrtg/zlib/lib -L/opt/mrtg/libpng/lib" ./configure && make


wobei ich nun eine fehlermeldung erhalte, dass die zlib nicht sauber sei



/usr/bin/ld -b +h libgd.sl.2 +b /usr/local/lib -o .libs/libgd.sl.2.0 gd.lo gdfx.lo gd_security.lo gd_gd.lo gd_gd2.lo gd_io.lo gd_io_dp.lo gd_gif_in.lo gd_gif_out.lo gd_io_file.lo gd_io_ss.lo gd_jpeg.lo gd_png.lo gd_ss.lo gd_topal.lo gd_wbmp.lo gdcache.lo gdfontg.lo gdfontl.lo gdfontmb.lo gdfonts.lo gdfontt.lo gdft.lo gdhelpers.lo gdkanji.lo gdtables.lo gdxpm.lo wbmp.lo -L/opt/mrtg/zlib/lib -L/opt/mrtg/libpng/lib -lpng -lz -lm -lc
/usr/bin/ld: Invalid loader fixup in text space needed in output file for symbol "$00000026" in input file: "/opt/mrtg/zlib/lib/libz.a(inflate.o)". Make sure it was compiled with +z/+Z.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1


ich finde jedoch in den configure-parameter von zlib nichts mit +z
ne idee???

MiGo
20.03.06, 21:36
Eventuell hilft ein Eintrag des Lib-Dirs in die /etc/ld.so.conf :)

traffic
21.03.06, 04:27
Was ist das denn überhaupt für ein Betriebssystem? Nach Linux sehen die Fehlermeldungen nicht aus...

/etc/ld.so.conf ist ein Linuxismus, das gibt es anderswo nicht. Aber damit hat letzte Problem auch nichts zu tun:

Kompilier die zlib nochmal mit der Option "+z" oder "+Z", indem Du diese zur Umgebungsvariable CFLAGS hinzufügst.

Ein Blick in die man-page des Compilers, welcher auch immer es ist, schadet bestimmt auch nicht. Der GCC hat jedenfalls keine solche Option.

echo
21.03.06, 10:56
Hi,
hab nun die libs neu compiliert und es scheint zu funktionieren :)
vielen dank euch.
für den den es intressiert, es handelte sich um HP-UX 11.00...




cd zlib-1.2.3
CFLAGS="+z" ./configure --prefix=/opt/mrtg/zlib && make && make install

cd ../libpng-1.2.8-config
CFLAGS="-I/opt/mrtg/zlib/include -L/opt/mrtg/zlib/lib" ./configure --prefix=/opt/mrtg/libpng && make && make install

cd ../gd-2.0.33
CFLAGS="-I/opt/mrtg/zlib/include -I/opt/mrtg/libpng/include -L/opt/mrtg/zlib/lib -L/opt/mrtg/libpng/lib" ./configure --prefix=/opt/mrtg/gd && make && make install

cd ../mrtg-2.13.2
./configure --prefix /opt/mrtg/mrtg --with-gd-lib=/opt/mrtg/gd/lib --with-gd-inc=/opt/mrtg/gd/include && make && make install