GDlib

Apache, Lighttpd, nginx, Cherokee
Post Reply
fuse
Posts: 11
Joined: 2003-04-08 17:24
 

GDlib

Post by fuse »

hi kann mir wer sagen wie ich GDlib auf meinen server beckom und wie ich es ausführe

THX im vorraus
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: GDlib

Post by jtb »

Falls Suse: nutze yast und installiere die GDLib (alternativ direkt mit rpm)

Falls Debian: apt-get install libgd2
mark
Posts: 295
Joined: 2003-04-15 16:48
Location: Oldenburg
Contact:
 

Re: GDlib

Post by mark »

Und ohne RPM (weil die RPMs meist nur 1.8.4 sind), wenn du eine gd 2.0.X brauchst:

wget http://www.boutell.com/gd/http/gd-2.0.12.tar.gz
tar xzf gd-2.0.12.tar.gz
cd gd-2.0.12
./configure
make
make install

Dann hast die Bibliotheken unter /usr/local/lib

Allerdings funktioniert die 2.0.X Version mit PHP 4.2.3 nur mit einem Patch. Den bekommste auf der Homepage von gd: http://www.boutell.com/gd/ (unten)

PHP 4.3.x haben bereits eine GD Version drin, die mit GD 2.0.x kompatibel sein soll. Ansonsten sollte das einkompilieren von der gd 2.0.12 in php 4.3.X kein Problem sein.

Gruß
Mark
fuse
Posts: 11
Joined: 2003-04-08 17:24
 

Re: GDlib

Post by fuse »

das bringt er mir dann

collect2: ld returned 1 exit status
make[1]: *** [gdparttopng] Error 1
make[1]: Leaving directory `/etc/gd-2.0.12'
make: *** [install-recursive] Error 1

was heisst das
mark
Posts: 295
Joined: 2003-04-15 16:48
Location: Oldenburg
Contact:
 

Re: GDlib

Post by mark »

1. Wann bringt er dir das ? Beim make von gd ?

2. Da gehört noch mehr zu der Fehlermeldung... Bitte poste auch noch das da drüber...

Gruß
Mark
fuse
Posts: 11
Joined: 2003-04-08 17:24
 

Re: GDlib

Post by fuse »

bei make das
creating annotate
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdparttopng.o -MD -MP -MF ".deps/gdparttopng.Tpo"
-c -o gdparttopng.o `test -f 'gdparttopng.c' || echo './'`gdparttopng.c;
then mv ".deps/gdparttopng.Tpo" ".deps/gdparttopng.Po";
else rm -f ".deps/gdparttopng.Tpo"; exit 1;
fi
/bin/sh ./libtool --mode=link gcc -g -O2 -o gdparttopng gdparttopng.o ./libgd.la -ljpeg -lm
gcc -g -O2 -o .libs/gdparttopng gdparttopng.o ./.libs/libgd.so /usr/lib/libjpeg.so -lm -Wl,--rpath -Wl,/usr/local/lib
gdparttopng.o: In function `main':
/root/gd-2.0.12/gdparttopng.c:42: undefined reference to `gdImageCreateFromGd2Part'
collect2: ld returned 1 exit status
make[2]: *** [gdparttopng] Error 1
make[2]: Leaving directory `/root/gd-2.0.12'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/gd-2.0.12'
make: *** [all] Error 2

und wenn ich dann make install mache das
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/gd-2.0.12/config'
make[1]: Leaving directory `/root/gd-2.0.12/config'
Making install in test
make[1]: Entering directory `/root/gd-2.0.12/test'
make[2]: Entering directory `/root/gd-2.0.12/test'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/gd-2.0.12/test'
make[1]: Leaving directory `/root/gd-2.0.12/test'
make[1]: Entering directory `/root/gd-2.0.12'
/bin/sh ./libtool --mode=link gcc -g -O2 -o gdparttopng gdparttopng.o ./libgd.la -ljpeg -lm
gcc -g -O2 -o .libs/gdparttopng gdparttopng.o ./.libs/libgd.so /usr/lib/libjpeg.so -lm -Wl,--rpath -Wl,/usr/local/lib
gdparttopng.o: In function `main':
/root/gd-2.0.12/gdparttopng.c:42: undefined reference to `gdImageCreateFromGd2Part'
collect2: ld returned 1 exit status
make[1]: *** [gdparttopng] Error 1
make[1]: Leaving directory `/root/gd-2.0.12'
make: *** [install-recursive] Error 1
carsten_s
Posts: 20
Joined: 2002-10-15 22:30
Location: Hessen
 

Re: GDlib

Post by carsten_s »

Wie habt ihr das gelöst?
Bekomme die gleiche Fehlermeldung.
b2b32
Posts: 12
Joined: 2006-03-09 16:52
 

Re: GDlib

Post by b2b32 »

Carsten_s wrote:Wie habt ihr das gelöst?
Bekomme die gleiche Fehlermeldung.


Also nochmal zu dem Thema:

Ich habe einen Root Server mit PHP Version 4.3.10 und will gd-2.0.33 installieren.

Habe in mein Verzeichnis root einen Ordner erstellt /gd dann mein gd-2.0.33 entpackt und mit: ./configure aufgerufen.

....................................................................

checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/i586-suse-linux/bin/ld) supports shared librar ies... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... (cached) ranlib
checking for X... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for ld used by GCC... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, ch ar * *outbuf, size_t *outbytesleft);
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking whether iconv.h defines iconv_t... yes
checking for sin... no
checking for sin in -lm... yes
checking for deflate in -lz... no
configure: WARNING: zlib is required - see http://www.gzip.org/zlib/
checking for libpng-config... no
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking for png_create_read_struct in -lpng... no
configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/
checking for freetype-config... no
checking for FT_Init_FreeType in -lfreetype... no
configure: WARNING: not found - disabling freetype support
checking freetype/freetype.h usability... no
checking freetype/freetype.h presence... no
checking for freetype/freetype.h... no
checking for jpeg_set_defaults in -ljpeg... no
checking for XpmReadFileToXpmImage in -lXpm... no

** 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

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/gdlib-config
config.status: creating test/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
s15204558:/gd # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for /usr/i586-suse-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... //bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/i586-suse-linux/bin/ld) supports shared librar ies... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... (cached) ranlib
checking for X... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for ld used by GCC... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, ch ar * *outbuf, size_t *outbytesleft);
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking whether iconv.h defines iconv_t... yes
checking for sin... no
checking for sin in -lm... yes
checking for deflate in -lz... no
configure: WARNING: zlib is required - see http://www.gzip.org/zlib/
checking for libpng12-config... no
checking for libpng-config... no
checking png.h usability... no
checking png.h presence... no
checking for png.h... no
checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking for png_create_read_struct in -lpng... no
configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/
checking for freetype-config... no
checking for FT_Init_FreeType in -lfreetype... no
configure: WARNING: not found - disabling freetype support
checking ft2build.h usability... no
checking ft2build.h presence... no
checking for ft2build.h... no
no
checking for FcInit in -lfontconfig... no
checking for jpeg_set_defaults in -ljpeg... no
checking for XpmReadFileToXpmImage in -lXpm... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... gcc

** Configuration summary for gd 2.0.33:

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

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/gdlib-config
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands

.............................................

Danach make ausgeführt.

collect2: ld returned 1 exit status
make[2]: *** [gdparttopng] Error 1
make[2]: Leaving directory `/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/gd'
make: *** [all] Error 2


Auch bei mir kommt die Fehlermeldung.

Wer kann mir bitte helfen?
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: GDlib

Post by captaincrunch »

checking for png_create_read_struct in -lpng... no
configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
b2b32
Posts: 12
Joined: 2006-03-09 16:52
 

Re: GDlib

Post by b2b32 »

Heißt das ich muss erst die anderen Sachen installieren und dann erst GD oder was?


configure: WARNING: zlib is required - see http://www.gzip.org/zlib/


configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/

In meiner PHP INFO steht:

zlib
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2



Ein kleiner Kommentar wäre nett.
captaincrunch
Userprojekt
Userprojekt
Posts: 7066
Joined: 2002-10-09 14:30
Location: Dorsten
Contact:
 

Re: GDlib

Post by captaincrunch »

Du brauchst zusätzlich noch die Header-Files (meist als -dev oder -devel-Pakete bekannt).
DebianHowTo
echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq"|dc
b2b32
Posts: 12
Joined: 2006-03-09 16:52
 

Re: GDlib

Post by b2b32 »

CaptainCrunch wrote:Du brauchst zusätzlich noch die Header-Files (meist als -dev oder -devel-Pakete bekannt).


wie wo was brauche ich...sorry das ich mich so doof anstellen aber erkläre mal genauer....danke
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: GDlib

Post by rootsvr »

Die alt bekannte Frage: meinst Du du solltest mit deinen Kenntnissen einen Server betreiben?

zu Deiner Frage: libgd wird aus dem Sourcecode gebaut, um bestimmte Funktionen wie Unterstützung von png und jpg einbauen zu können braucht es den Quellcode von anderen librarys (um ihn dann einzubinden), Nur ein installiertes 'exe' reicht nicht.

Das heißt Du suchst von deiner Distribution wo diese Pakete drinnen sind. Da Du die Distribution nicht verrätst mußt Du selber gucken, Fehlermeldungen helfen, dann das entsprechende -dev oider-devel paket einspielen.

nochmal nen ./configure schauen ob andere Fehlermeldungen entstehen und diese Abhängigkeiten fixen. irgendwann hast Du dann vielleicht nen fertiges gd.
b2b32
Posts: 12
Joined: 2006-03-09 16:52
 

Re: GDlib

Post by b2b32 »

rootsvr wrote:Die alt bekannte Frage: meinst Du du solltest mit deinen Kenntnissen einen Server betreiben?

zu Deiner Frage: libgd wird aus dem Sourcecode gebaut, um bestimmte Funktionen wie Unterstützung von png und jpg einbauen zu können braucht es den Quellcode von anderen librarys (um ihn dann einzubinden), Nur ein installiertes 'exe' reicht nicht.

Das heißt Du suchst von deiner Distribution wo diese Pakete drinnen sind. Da Du die Distribution nicht verrätst mußt Du selber gucken, Fehlermeldungen helfen, dann das entsprechende -dev oider-devel paket einspielen.

nochmal nen ./configure schauen ob andere Fehlermeldungen entstehen und diese Abhängigkeiten fixen. irgendwann hast Du dann vielleicht nen fertiges gd.
Die alt bekannte Frage: meinst Du du solltest mit deinen Kenntnissen einen Server betreiben?---->ich gebe mein bestes

Version 2.0.33 (Stable)
This package includes the header files and libraries needed for developing programs using gd. (from rpm description)

Und nun?
Was brauchst du alles für Daten um mir zu helfen?
Ich geh schon am Stock....lol
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: GDlib

Post by rootsvr »

Benutzt Du Suse?
Debian?
RedHat?

generell kann es doch nicht so schwer sein die Ausgaben von Configure anzuschauen, da wo er Warnung und Errorr bringt nachzugooglen und dann ggf die fehlenden -dev Pakete zu installieren

Normalerweise reicht es aus die php4-gd (o.ä.) Pakete zu installieren, man muß nicht unbedingt die ganze choose per hand bauen.
b2b32
Posts: 12
Joined: 2006-03-09 16:52
 

Re: GDlib

Post by b2b32 »

Habe SuSE 9.3, und schon ne Menge Anleitungen zum Instalieren gelesen, aber es kommen jedes mal andere Fehler.

Ich weiß gar nicht mehr weiter. Die Anleitung hier war am besten:

http://megaz.arbuz.com/2003/11/08/russi ... 033-guide/

php4-gd installieren..oha...

http://packages.debian.org/stable/web/php4-gd

Du meinst sicherlich das hier, aber wie geht das und was muss man beachten. Habe einen AMD Opteron 175 (Dual-Core).

Was kann ich nun machen?
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
Contact:
 

Re: GDlib

Post by rootsvr »

Naja wenn Du wirklich meinst ein Debian packet auf Suse einspielen zu wollen.. viel Spaß!

Ne im Ernst: schau ins yast such nach gd da wird ja was dabei sein, oder nicht? Ich hab nen Debian, deshalb kann ich dir das leider nicht vorbeten (was eh nicht Sinn der Sache ist).

Also: guck ob es ein php-gd paket im yast gibt, wenn ja nimm das.
wenn nein installier die devel pakete die dir fehlen.

Ich würde Dir raten dringend ne Kiste zu Hause aufzusetzen und dann damit mal zu üben..
b2b32
Posts: 12
Joined: 2006-03-09 16:52
 

Re: GDlib

Post by b2b32 »

ok dann schau ich mal wo ich das her bekomme
robert1962
Posts: 34
Joined: 2005-10-05 14:41
Contact:
 

Re: GDlib

Post by robert1962 »

Also ich muss "Rootsvr" recht geben, mit seiner Ausführung.
Ich habe auch SuSE 9.3 Pro. Starte Yast und du findest. Dort findest du das php4-gd mehr brauchst du doch nicht!

Also über Yast zu installieren ist ja wohl kein Akt.
Wenn man nicht so sicher ist rate ich von selbst compilieren ab.
Zumal Debian und SuSE 2 Welten sind.

Gruß

Robert
Post Reply