LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What to do when "make" fails?... (https://www.linuxquestions.org/questions/linux-newbie-8/what-to-do-when-make-fails-205741/)

ArthurDent 07-16-2004 04:14 AM

What to do when "make" fails?...
 
I have been trying (once again) to install the Kdevelop package from sources. I have an RPM version which is giving me some strange problems so I thought I would try to configure and install the package from source.

"./configure" works with no apparent errors and invites me to run "make".

When I run "make" it goes great guns for what seems like ages but finally stops at the following point:
Code:

/bin/sh ../libtool --silent --mode=link --tag=CXX g++  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION    -o libkdevelop.la -rpath /usr/lib -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/X11R6/lib -L/usr/lib/qt-3.3/lib -L/usr/lib  -version-info 1:0 dummy.lo ../lib/interfaces/libkdevinterfaces.la ../lib/util/libkdevutil.la ../lib/project/libkdevproject.la ../lib/widgets/propeditor/libpropertyeditor.la  -lktexteditor -lkparts -lkio
/usr/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
make[3]: *** [libkdevelop.la] Error 1
make[3]: Leaving directory `/home/mark/installs/kdevelop-3.0.4/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/mark/installs/kdevelop-3.0.4/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mark/installs/kdevelop-3.0.4'
make: *** [all] Error 2

I half-heartedly ran "make install" which - to my surprise - did run, but of course failed to produce an executable.

My question is this:
If ./configure produced no errors how do I discover where the compile failed?...
And what do I do about it?

Any help gratefully received...

Mark

Tinkster 07-16-2004 04:29 AM

Install the library ld was complaining about?

libpng is missing.


Cheers,
Tink

ArthurDent 07-16-2004 04:37 AM

Thanks Tink,

But I'm not sure - do I not have libpng?...

See results of locate...

Code:

[mark@localhost mark]$ locate libpng
/var/cache/yum/base/headers/libpng10-devel-0-1.0.13-13.i386.hdr
/var/cache/yum/base/headers/libpng-devel-2-1.2.2-22.i386.hdr
/var/cache/yum/updates-released/headers/libpng-devel-2-1.2.2-20.i386.hdr
/var/cache/yum/updates-released/headers/libpng10-devel-0-1.0.13-11.i386.hdr
/var/cache/yum/updates-released/headers/libpng10-devel-0-1.0.15-5.i386.hdr
/var/cache/yum/updates-released/headers/libpng-devel-2-1.2.5-5.i386.hdr
/var/cache/yum/updates/headers/libpng10-devel-0-1.0.15-5.i386.hdr
/var/cache/yum/updates/headers/libpng-devel-2-1.2.5-5.i386.hdr
/usr/share/doc/libpng-1.2.5
/usr/share/doc/libpng-1.2.5/example.c
/usr/share/doc/libpng-1.2.5/CHANGES
/usr/share/doc/libpng-1.2.5/README
/usr/share/doc/libpng-1.2.5/TODO
/usr/share/doc/libpng-1.2.5/libpng.txt
/usr/share/doc/libpng-1.2.5
/usr/share/doc/libpng10-1.0.15
/usr/share/doc/libpng10-1.0.15/example.c
/usr/share/doc/libpng10-1.0.15/CHANGES
/usr/share/doc/libpng10-1.0.15/README
/usr/share/doc/libpng10-1.0.15/TODO
/usr/share/doc/libpng10-1.0.15/libpng.txt
/usr/share/doc/libpng10-1.0.15
/usr/lib/libpng.so.3
/usr/lib/libpng12.so.0
/usr/lib/libpng.so.2
/usr/lib/gthumb/modules/libpngexporter.so
/usr/lib/libpng.so.2.1.0.15
/usr/lib/libpng.so.3.1.2.5
/usr/lib/libpng12.so.0.1.2.5
/home/mark/wx/wxX11-2.4.2/src/png/libpng.3
/home/mark/wx/wxX11-2.4.2/src/png/libpngpf.3
/home/mark/cube/bin/libpng1.dll
/mnt/msdos/Dev-Cpp/lib/libpng.a
/mnt/msdos/wxWindows-2.4.2/src/png/libpng.3
/mnt/msdos/wxWindows-2.4.2/src/png/libpngpf.3
[mark@localhost mark]$


Tinkster 07-16-2004 04:41 AM

Heh ... apparently several versions :}

Check the actual lib's (/usr/lib) using ldd

locate libpng\.so | grep /usr/lib | xargs ldd

If they's all right try adding -L/usr/lib explicitly to the
statement.


Cheers,
Tink

ArthurDent 07-16-2004 04:47 AM

Hi Tink,

Sorry to be so thick, but I'm afraid I really don't know what this means...

Code:

[mark@localhost mark]$ locate libpng\.so | grep /usr/lib | xargs ldd
/usr/lib/libpng.so.3:
        linux-gate.so.1 =>  (0x0038c000)
        libz.so.1 => /usr/lib/libz.so.1 (0x005a9000)
        libm.so.6 => /lib/tls/libm.so.6 (0x004aa000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0036e000)
/usr/lib/libpng.so.2:
        linux-gate.so.1 =>  (0x00791000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00387000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0036e000)
/usr/lib/libpng.so.2.1.0.15:
        linux-gate.so.1 =>  (0x00501000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00387000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0036e000)
/usr/lib/libpng.so.3.1.2.5:
        linux-gate.so.1 =>  (0x00c5b000)
        libz.so.1 => /usr/lib/libz.so.1 (0x005a9000)
        libm.so.6 => /lib/tls/libm.so.6 (0x004aa000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00387000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0036e000)
[mark@localhost mark]$

Does this mean it's OK?

Is it wrong to have so many versions?

Should I remove the older versions? If so how?

... and what do you mean by add -L/usr/lib explicitly to the statement. ?

Sorry for all the questions but I am at heart really still a newbie...

ArthurDent 07-16-2004 09:27 AM

Can anybody get me to the next step here?

Thanks in advance....

Mark

corbis_demon 07-16-2004 09:48 AM

First try emerge rsync.The latest version of libpng installs png.h and pngconf.h into /usr/local/include. The static library and shared object are at /usr/local/lib.There is no /usr/local/include/libpng.The problem seems to be that there is an old copy of png.h at /usr/include and /usr/lib, which by default are being searched by the compiler first, and thus linked against first.Move the old versions of the headers and symlink the new headers to the /usr/include dir.Try doing the same with the static and shared libraries as well.
The simplest fix is probably (as root) assuming $prefix is
/usr/local

cd /usr/local/include
ln -s libpng/*.h .

then remove config.cache and reconfigure.If you have trouble doing this try adding CPPFLAGS==-I/usr/local/include/libpng.

Or else remove the old packages with yast.

ArthurDent 07-16-2004 10:39 AM

Thanks Corbis_demon,

I'm not sure I understand what you were getting me to do - but I did it anyway.

Unfortunatley I think I made a mistake. When I typed ln -s libpng/*.h I left off the end "." (i.e. I typed "ln -s libpng/*.h" NOT "ln -s libpng/*.h .")

Ooops! sorry. Can I fix that?

Quote:

then remove config.cache
As I had already run "make distclean" before starting again I presume I didn't need to do this?

If I try running ./configure with the "CPPFLAGS==-I/usr/local/include/libpng" it just gives me this error:
Code:

[mark@localhost kdevelop-3.0.4]$ ./configure CPPFLAGS==-I/usr/local/include/libpng --enable-debug=full --prefix=$KDEDIR --with-kdelibsdoxy-dir=$KDEDIR/share/doc/HTML/en/kdelibs-apidocs --disable-ada --disable-bash --disable-fortran --disable-haskell --disable-java --disable-pascal --disable-perl --disable-php --disable-python --disable-ruby --disable-sql --disable-antproject --disable-genericproject --disable-scriptproject --disable-trollproject --disable-clearcase --disable-perforce --disable-subversion
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

What should I do next?

ArthurDent 07-16-2004 11:07 AM

Ignore my last post...

I have been looking more carefully at what you said and I did these searches:

Is this significant?

1) png.h
Code:

[root@localhost include]# locate png.h
/usr/local/include/wx/imagpng.h
/home/mark/wx/wxX11-2.4.2/include/wx/imagpng.h
/home/mark/wx/wxX11-2.4.2/src/png/png.h
/mnt/msdos/Dev-Cpp/include/png.h
/mnt/msdos/Dev-Cpp/include/wx/imagpng.h
/mnt/msdos/wxWindows-2.4.2/include/wx/imagpng.h
/mnt/msdos/wxWindows-2.4.2/src/png/png.h
[root@localhost include]#

2) pngconf.h
Code:

[root@localhost include]# locate pngconf.h
/home/mark/wx/wxX11-2.4.2/src/png/pngconf.h
/mnt/msdos/Dev-Cpp/include/pngconf.h
/mnt/msdos/wxWindows-2.4.2/src/png/pngconf.h
[root@localhost include]#

3) RPMs Installed (*png)
Code:

[root@localhost include]# rpm -qa | grep png
libpng10-1.0.15-5
libpng-1.2.5-5

I am using Fedora Core 2 so I don't have yast (do I?) Should I use apt-get to uninstall / re-install?

darthtux 07-16-2004 11:13 AM

I think it's looking for the development version of libpng

http://rpm.pbone.net/index.php3?stat...2.5-6.i386.rpm

ArthurDent 07-17-2004 05:19 AM

Well thank you all!

That did the trick! (I also discovered that I needed the development version of the libjpeg library) After the world's longest ever compile (geriatric 500Mhz PIII) I now have a fully-functional version of KDevelop.

I've said it before and I'm sure I'll say it again - This is (probably) the friendliest and most useful place on Earth.

Thanks again....

Mark

Tinkster 07-17-2004 04:39 PM

Quote:

Originally posted by ArthurDent
I've said it before and I'm sure I'll say it again - This is (probably) the friendliest and most useful place on Earth.

Thanks again....

Mark
Tank you for the positive feedback, I guess Jermey and
all of us mods equally appreciate that :)

As for
Quote:

friendliest and most useful place on Earth.
...
How's Ford Prefect? :}


Cheers,
Tink

ArthurDent 07-18-2004 03:51 AM

Yes. Without doubt one of the friendliest places on Earth. However, Ford does tell of this little-known planet, just left of Alpha Nova in the outward arm of the spiral galaxy which is entirely populated by women - who not only solve all your Linux problems but they also... Oh wait - I've just found the entry for LQ in the Hitch Hikers' Guide to the Galaxy. It says:


LinuxQuestions.org - An unusually friendly place on this otherwise rather uncouth little planet. Populated by the Linuxians - strange penguin-like humanoids - who like to solve each others' problems without asking for the little green bits of paper that seem to cause so many problems on the rest of the planet - and generally be nice to one another.

The Linuxians, under their General Torvalds, are apparently at war with another group of humanoids , the Windowlians, and their General Gates. The funny thing about this war is that the Windowlians have to pay for their weapons which very often don't work, so the Linuxians just give them their weapons (saying anyone can have them if they want them) which they get for free anyway because they make them themselves.

We predict that this war will be won by the Linuxians which will be nice because it will be the first example on this planet of a war being won by the 'nice' side."


Hmmm....


All times are GMT -5. The time now is 01:25 AM.