Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: GentooForum.de. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

12.07.2005, 15:50

[gelöst] Probleme mit Makefile

Hallo liebes Forum!

Ich hatte vor einiger Zeit denselben Thread bereits in der Rubrik Multimedia gepostet, allerdings keine Antwort erhalten. Hier findet ihr den ursprünglichen Thread.

Da mein Problem in erster Linie mit dem make-File zu tun hat, poste ich es hier noch einmal, in der Hoffnung, dass mir hier jemand helfen kann:

Ich versuche icns2png unter Gentoo 2005.0 zu installieren, allerdings leider erfolglos.

Da es davon kein ebuild gibt, habe ich mir den tarball heruntergeladen und versuche nun diesen zu installieren. Vorraussetzung sind libpng und zlib. Gemäss der README soll ein einfaches

Quellcode

1
2
3
make 
make test
make install
ausreichen. Ich erhalte aber nach

Quellcode

1
$ make
folgende Fehlermeldung:

Quellcode

1
c++: libpng-1.2.5/libpng.a: No such file or directory
. Bei mir ist libpng-1.2.8 installiert und ein

Quellcode

1
$ locate libpng.a
zeigt auch, dass libpng.a unter /usr/lib installiert ist.

In der README steht folgendes:

Zitat

You will need a copy of libpng, and zlib.
After building libpng, and zlib,
update the Makefile ZLIBINC, and LPNGINC
to show the install paths for
zlib and libpng.


In dem MAKEFILE ist folgender Absatz enthalten:

Quellcode

1
2
3
4
5
6
# Where the libpng and zlib library 
and include files are located
LPNGINC=libpng-1.2.5
ZLIBINC=zlib-1.1.4
LPNGLIB=libpng-1.2.5
ZLIBLIB=zlib-1.1.4


Da ich mich mit makefiles normalerweise nicht weiter beschäftige, hier meine Frage:
Was genau muss ich denn da jetzt ändern? Die Versionsnummer? Muss ich evt. das grossgeschriebene durch einen path ersetzen, z.B. anstelle von LPNGLIB=libpng-1.2.5 z.B. /usr/lib=libpng-1.2.8?

Ich wäre wirklich unendlich dankbar, wenn mir jemand beim Anpassen des Makefile helfen könnte, oder mir sagt, wie er das Programm unter Gentoo installiert hat. Ich bin für jede Hilfe dankbar!

Viele Grüsse,
BigFish
Where there's a will, there's a way.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »BigFish« (12.07.2005, 21:35)


2

12.07.2005, 17:09

kannst mit
./configure --help
dir nich einfach was raussuchen wo du den pfad angibst?
zu den prog oder includes oder was auch immer ^^
./configure erstellt doch auch die make *glaube ich muss jetzt nicht stimmen*

amielke

unregistriert

3

12.07.2005, 17:15

hallo bUscher,

die .configure erstellt meines wissens nach nicht die make datei. .configure gibt einem aber viele Möglichkeiten Pfade und Optionen anzugeben.

Wie ist denn die Fehlermeldung vom .configure ??

4

12.07.2005, 17:27

Probleme mit Makefile

Vielen Dank erstmal für Eure Antworten!

Es gibt kein .configure!

Es gibt nur

Quellcode

1
2
3
make
make test
make install


Hier ein Ausschnitt aus der README:

Zitat

===============================================================================
Building Icon2PNG - Linux Edition

You will need a copy of libpng, and zlib. After building libpng, and zlib,
update the Makefile ZLIBINC, and LPNGINC to show the install paths for
zlib and libpng.

You should then only have to run
make
make test
make install

===============================================================================
Using Icon2PNG - Linux Edition

Basic Usage:
./icns2png OmniWeb.icns
Icon2PNG Linux Edition - (C) 2002 Mathew Eis
Converting OmniWeb.icns to OmniWeb.png...

This will result in a file OmniWeb.png with a 128x128 icon from OmniWeb.icns.

===============================================================================


Das Programm beschwert sich ja offensichtlich darüber, dass libpng nicht gefunden wird, obwohl es vorhanden ist. Die Frage ist nur, muss es unbedingt die Version sein, die im Makefile angegeben ist? Denn wenn das Programm genau nach dieser Version sucht, wird es sie nicht finden können, denn ich habe ja eine höhere Version installiert. Die Frage ist nun: Kann man das anpassen, oder nicht?

Ich bin schon etwas verzweifelt ....

Und nochmal: Für jeden noch so kleinen Hinweis bin ich unsagbar dankbar.

Viele Grüsse,
BigFish
Where there's a will, there's a way.

amielke

unregistriert

5

12.07.2005, 17:30

hänge doch mal bitte die Makefile an.

6

12.07.2005, 18:29

Probleme mit Makefile

Hallo amielke!

Und hier das Makefile:

Zitat

# Makefile for Icns2PNG, MacOS X / Linux
#
# Copyright (C) 2002 Mathew Eis <mathew@bearca.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#

# version number
version=0.5

# where make install puts icns2png
prefix=/usr/local

# Where the libpng and zlib library and include files are located
LPNGINC=libpng-1.2.5
ZLIBINC=zlib-1.2.2
LPNGLIB=libpng-1.2.5
ZLIBLIB=zlib-1.2.2

CC=c++

CFLAGS=-O -I$(LPNGINC) -I$(ZLIBINC)
CPPFLAGS=$(CFLAGS)
LDFLAGS=-L. -L$(LPNGINC) -L$(ZLIBLIB) -lpng12 -lz -lm
LDFLAGS_A=-L$(LPNGINC) -L$(ZLIBLIB) $(LPNGLIB)/libpng.a -lz -lm

OBJS = icns2png.o iconvert.o pngwriter.o byteswap.o

all: icns2png

test: icns2png
@cd test; rm -f Gnu_I.png Gnu_II.png Gnu_III.png; \
if ../icns2png Gnu_I.icns Gnu_II.rsrc Gnu_III.bin; then \
echo 'Icns2PNG test successful!'; \
else \
echo 'Icns2PNG test failed internal error'; \
fi; cd ..;

install: icns2png
install -m 755 icon2png $(prefix)/bin

release: icns2png test
@mkdir -p icon2png-$(version); \
cp icns2png icon2png-$(version); \
cp README icon2png-$(version); \
rm -f icon2png-$(version).tar; \
tar -cf icon2png-$(version).tar icon2png-$(version); \
rm -rf icon2png-$(version); \
echo 'Icns2PNG $(version) release package created.'; \
rm -f #.o;

icns2png: $(OBJS)
$(CC) -o icns2png $(CFLAGS) $(OBJS) $(LDFLAGS_A)

clean:
rm -f #.o icns2png


Vielen Dank für Dein Interesse!

Viele Grüsse,
BigFish
Where there's a will, there's a way.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »BigFish« (12.07.2005, 18:31)


amielke

unregistriert

7

12.07.2005, 18:41

Hallo,

du hast ja auf Deinem System die libpng-1.2.8, richtig???

mach mal nen link

"ln -s libpng-1.2.8 libpng-1.2.5"

dannach nen

"ldconfig "

und versuch das Programm nochmal zu maken.

Weiss aber nicht ob es geht, ist aber mal nen versuch wert.

Wenn es nicht geht

8

12.07.2005, 19:17

Probleme mit Makefile

Hallo amielke!

Ich hoffe, ich habe die Schritte richtig ausgeführt:

Als normaler user habe ich

Quellcode

1
$ ln -s libpng-1.2.8 libpng-1.2.5
ausgeführt.

Anschliessend als root

Quellcode

1
# ldconfig
.

Wenn ich dann als user in das Verzeichnis icn2png wechsle und make ausführe bekomme ich folgende Fehlermeldung:

Quellcode

1
2
3
4
paul@saturn ~/Desktop/Downloads/icns2png $ make
c++ -o icns2png -O -Ilibpng-1.2.5 -Izlib-1.2.2 icns2png.o iconvert.o pngwriter.o byteswap.o -Llibpng-1.2.5 -Lzlib-1.2.2 libpng-1.2.5/libpng.a -lz -lm
c++: libpng-1.2.5/libpng.a: No such file or directory
make: *** [icns2png] Error 1


Ich bin total ratlos.

Viele Grüsse,
BigFish
Where there's a will, there's a way.

9

12.07.2005, 19:30

Änder im Makefile mal die Versionsnummer auf 1.2.8.


@amielke:

Zitat

die .configure erstellt meines wissens nach nicht die make datei.

Was macht configure denn dann ?

Zitat

.configure gibt einem aber viele Möglichkeiten Pfade und Optionen anzugeben

Und wo werden die dann verwendet, wenn nicht im Makefile?
__
Rud

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Rudwardt« (12.07.2005, 19:35)


10

12.07.2005, 19:41

Probleme mit Makefile

Hallo Rudwardt!

Das hatte ich vorher auch schon probiert, aber ohne Erfolg. Da ich in der Zwischenzeit schon so viel ausprobiert habe - hier meine Änderungen an dem Makefile:
--snip--

Quellcode

1
2
3
4
5
# Where the libpng and zlib library and include files are located
LPNGINC=libpng-1.2.8
ZLIBINC=zlib-1.2.2
LPNGLIB=libpng-1.2.8
ZLIBLIB=zlib-1.2.2

--snap--

Nach einem make bekomme ich folgenden Fehler:

Quellcode

1
2
3
4
paul@saturn ~/Desktop/Downloads/icns2png $ make
c++ -o icns2png -O -Ilibpng-1.2.8 -Izlib-1.2.2 icns2png.o iconvert.o pngwriter.o byteswap.o -Llibpng-1.2.8 -Lzlib-1.2.2 libpng-1.2.8/libpng.a -lz -lm
c++: libpng-1.2.8/libpng.a: No such file or directory
make: *** [icns2png] Error 1


?(

Falls noch jemand Ideen hat ...

Viele Grüsse,
BigFish
Where there's a will, there's a way.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »BigFish« (12.07.2005, 20:15)


11

12.07.2005, 20:23

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
# Where the libpng and zlib library and include files are located
 LPNGINC=libpng-1.2.5
 ZLIBINC=zlib-1.2.2
 LPNGLIB=libpng-1.2.5
 ZLIBLIB=zlib-1.2.2
 
 CC=c++
 
 CFLAGS=-O -I$(LPNGINC) -I$(ZLIBINC)
 CPPFLAGS=$(CFLAGS)
 LDFLAGS=-L. -L$(LPNGINC) -L$(ZLIBLIB) -lpng12 -lz -lm
 LDFLAGS_A=-L$(LPNGINC) -L$(ZLIBLIB) $(LPNGLIB)/libpng.a -lz -lm


$(LPNGLIB)/libpng.a <-- Da wird der Pfad konstruiert.

Wenn die Fehlermeldung lautet:

Quellcode

1
c++: libpng-1.2.8/libpng.a: No such file or directory

dann sucht der Linker entweder nach '/usr/lib/libpng-1.2.8/libpng.a' oder nach '/libpng-1.2.8/libpng.a'

Wenn 'locate libpng.a' bei Dir das gleiche ergibt, wie bei mir, nämlich '/usr/lib/libpng.a', dann ist beides falsch.

Daher sollte entweder 'LPNGLIB=' (also nichts) oder 'LPNGLIB=/usr/lib' richtig sein.

Probiers mal...
__
Rud

12

12.07.2005, 21:21

Zitat

Original von amielke
die .configure erstellt meines wissens nach nicht die make datei. .configure gibt einem aber viele Möglichkeiten Pfade und Optionen anzugeben.


so hab mich nochmal erkundigt
und ./configure erzeugt die make datei
mit den pfaden die sie findet oder vorgesetzt bekommt

btw
solche autotool sind nicht sehr beliebt und hardcore codern
aber ich find se toll xD

13

12.07.2005, 21:33

Probleme mit Makefile

Hallo Rudwardt!

Vielen Dank für Dein letztes Posting! Das war in der Tat die Lösung des Problems.

Genau wie von Dir beschrieben habe ich im Makefile jetzt folgendes stehen:
--snip--

Quellcode

1
2
3
4
5
# Where the libpng and zlib library and include files are located
LPNGINC=libpng-1.2.8
ZLIBINC=zlib-1.2.2
LPNGLIB=/usr/lib
ZLIBLIB=zlib-1.2.2

--snap--

Ein make install schlägt allerdings mit folgender Fehlermeldung fehl:

Quellcode

1
2
3
4
saturn icns2png # make install
install -m 755 icon2png /usr/local/bin
install: cannot stat `icon2png': No such file or directory
make: *** [install] Error 1


Trotzdem hat das Makefile ein funktionsfähiges icns2png hervorgebracht, welches ich dann einfach direkt vom Verzeichnis ausführen kann, oder man kann es auch in ein anderes Verzeichnis nach Wahl kopieren.

Der Fehler liegt offensichtlich in der Namensgebung. Er findet kein icon2png denn es heisst ja auch icns2png.

Ich traue mich jetzt nicht einfach an dem Makefile rumzubasteln, denn ich bin ja kein Fachmann. Allerdings wollte ich doch mal fragen, ob es nicht mit folgender Änderung im Makefile funktionieren könnte:

Anstelle von:

Quellcode

1
2
install: icns2png
	install -m 755 icon2png $(prefix)/bin

einfach icon2png durch icns2png ersetzen?

Was sagst Du dazu?

Ich wüsste es generell gerne, denn vielleicht macht ja irgendjemand (oder sogar ich, irgendwann) einmal ein ebuild für dieses Programm. Ich finde es sehr nützlich um die MacIcons in .png umzuwandeln.

Vielen Dank für Eure Hilfe!
Ich setze den Thread trotzdem schon mal auf [gelöst], denn funktionieren tut's ja, wenn auch mit etwas Handarbeit.

Viele Grüsse,
BigFish
Where there's a will, there's a way.

14

12.07.2005, 21:46

Probleme mit Makefile

Hallo an alle:

Nun noch ein Nachtrag zu meine vorhergehenden Posting:

Zitat

install: icns2png
install -m 755 icon2png $(prefix)/bin


Ich habe das Makefile daraufhin abgeändert, d.h. anstelle von icon2png steht jetzt icns2png und damit erhalte ich bei einem make install als root folgendes Ergebnis:

Quellcode

1
2
saturn icns2png # make install
install -m 755 icns2png /usr/local/bin


Damit wär's das wohl!

Vielen Dank noch mal an alle, die Ihr Euch an dem Thread beteiligt habt! Ich bin so froh, dass es jetzt funktioniert .... :)

Viele Grüsse,
BigFish
Where there's a will, there's a way.