Ubuntu

kdevelop can't compile programs in kde4 (intrepid ibex)

Reported by Uwe Pfeifer on 2008-10-19
16
Affects Status Importance Assigned to Milestone
kdevelop (Ubuntu)
Undecided
Unassigned
libtool (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: kdevelop3

I'm on Intrepid Ibex, Kubuntu.

At the moment KDevelop can't compile programs giving me the following error:

cd '/home/uwe/Programming/practice/test/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" make -k
make all-recursive
../libtool: line 832: X--tag=CXX: command not found
Making all in src
../libtool: line 865: libtool: ignoring unknown tag : command not found
../libtool: line 832: X--mode=link: command not found
/bin/bash ../libtool --tag=CXX --mode=link g++ -O0 -g3 -o test main.o
../libtool: line 999: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1000: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
gcc: no input files
gcc: no input files
gcc: no input files
gcc: no input files
../libtool: line 2237: X-O0: command not found
../libtool: line 2237: X-g3: command not found
../libtool: line 2406: Xtest: command not found
X: user not authorized to run the X server, aborting.
../libtool: line 2418: Xtest: command not found
../libtool: line 2426: mkdir /.libs: No such file or directory
make[2]: Nothing to be done for `all-am'.
mkdir: cannot create directory `/.libs': Permission denied
make[2]: *** [test] Error 1
make[2]: Target `all' not remade because of errors.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***

Hope I posted this at the right point.
KDevelop also says in its version info it was running on KDE3.5.10 but im on Intrepid Ibex and therefore im running KDE4.

Installed version:
uwe@loopy:~/Programming/practice$ apt-cache policy kdevelop
kdevelop:
  Installed: 4:3.5.3-0ubuntu1
  Candidate: 4:3.5.3-0ubuntu1
  Version table:
 *** 4:3.5.3-0ubuntu1 0
        500 http://de.archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status

Harald Sitter (apachelogger) wrote :

Compiling one of the example apps works just fine here. Are you sure your build tree is clean and compatible with latest autotools/gcc?

Changed in kdevelop3:
status: New → Incomplete
Uwe Pfeifer (alphatrax) wrote :
Download full text (6.0 KiB)

Yes I'm sure, I just did a clean and distclean. I still get this error:

cd '/home/uwe/Programming/practice/test' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" make -f Makefile.cvs && cd '/home/uwe/Programming/practice/test/debug' && CXXFLAGS="-O0 -g3" "/home/uwe/Programming/practice/test/configure" --enable-debug=full && cd '/home/uwe/Programming/practice/test/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" make -k
aclocal
autoheader
automake
autoconf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if g...

Read more...

hunger (hunger) wrote :

This does look very much like a issue with autotools getting confused.

Could you please try again without all the unnecessary stuff (all those cds, prefixes to configure, setting up all the variables). I would bet that it will work then.

If it does work then you are probably running into some escaping hell... autotools sometimes get a very different notion of what belongs together than the rest of the world. Try adding one variable at a time till something breaks and check the shell code for the stuff that it is complaining about. I bet it has a space to much/few or some really wired escaping:-)

If it does not work, even without all the above changes: Could you please tar up the buildsystem files (and everything else;-) for me so that I can take a look? Your example code is not super secret, is it?

Best Regards,
Tobias

Uwe Pfeifer (alphatrax) wrote :

I'm not familiar with autotools etc. what I've done now is a distclean and I did ./configure && make from the shell
and I'm getting the same error again. I have now done a make dist and included the tar.gz in this comment.
Hope that is what you wanted. ;D

Uwe Pfeifer (alphatrax) wrote :

can't anyone fix this? :(

Harald Sitter (apachelogger) wrote :

Well.
It is not a bug in KDevelop. The issue is that eiher your source is not compatible with libtool (which was upgraded to version 2.x in Intrepid) or it is a bug in libtool itself.

I am moving the bug to the libtool source package, in case it is a bug, otherwise it can be closed as incompatibility.

Changed in kdevelop3:
status: Incomplete → New
Uwe Pfeifer (alphatrax) wrote :

well, my source was simply a

int main(void)
{
  return 0;
}

so I guess it's a bug in libtool.

This is not a valid libtool shell script, and is likely caused by mixing ltmain.sh and libtool.m4 from different versions of libtool (1.5 and 2.2)

Changed in libtool:
status: New → Invalid
Uwe Pfeifer (alphatrax) wrote :

So, what do I do now?
Everytime i create a new project in kdevelop, it doesn't compile :(((

That's clearly a bug in kdevelop, it's not creating or updating autoconfery properly

Uwe Pfeifer (alphatrax) wrote :

It would be really nice if you guys could fix this ;D
If you need any information just ask :D.

Magi Su (magisu) wrote :

Well, can any one fix it? I am not familiar with Linux compile system.

fpe (f-esser) wrote :

Hi. same problem here, but I found a workaround:

Edit the file <your project folder>/debug/libtool and replace line 2418
    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
with
    output_objdir=`$ECHO "X$output" | $Xsed -e 's%/[^/]*$%%'`

After that, compiling worked for me again.

It seems to me that there is a problem with the ECHO="echo" variable defined in line 153.
But if I just change it to lowercase echo or add another variable called echo, I get a lot of other errors.

fpe (f-esser) wrote :

Sorry, I wrote nonsense.

Of cause, adding a variable
echo="echo"
or maybe renaming the ECHO="echo" variable in line 153 is the right thing to do.
Otherwise all the other references to $echo will not work, and compiling fails.

(The errors I mentioned above were completely normal compiler errors caused by wrong code)

bzhao (bobax) wrote :

I have just drive Ubuntu 8.10 Yes I met this issue as well
I change all $echo into $ECHO in that file
the problem is fully solved.

Don Maghrak (dmaghrak) wrote :

I am working on getting the performance analysis tool OpenSpeedShop
working on ubuntu 8.10 and had the same issue after running make.
I added the line echo="echo" after line 153 (ECHO="echo") and the build is
now working fine. Since this appears to be an issue with how libtool
is created, will this be corrected in a future update to libtool?
My current version is:
dpm:~/oss-test/OpenSpeedShop$ libtool --version
ltmain.sh (GNU libtool) 2.2.4

On Thu, 2008-12-11 at 19:30 +0000, Don Maghrak wrote:

> I am working on getting the performance analysis tool OpenSpeedShop
> working on ubuntu 8.10 and had the same issue after running make.
> I added the line echo="echo" after line 153 (ECHO="echo") and the build is
> now working fine. Since this appears to be an issue with how libtool
> is created, will this be corrected in a future update to libtool?
>
No.

This is an issue with how the libtool in your *source tree* is created,
not /usr/bin/libtool.

> My current version is:
> dpm:~/oss-test/OpenSpeedShop$ libtool --version
> ltmain.sh (GNU libtool) 2.2.4
>
Try ./libtool --version instead of relying on $PATH

Scott
--
Scott James Remnant
<email address hidden>

Don Maghrak (dmaghrak) wrote :
Download full text (3.3 KiB)

Scott,
Thanks for your followup. The autotools stuff is not my strong point for sure.
After downloading a fresh cvs tree today and running configure all is well.
The ./libtool no longer has the issue I saw and the Makefile's are indeed
using that libtool and not /usr/bin/libtool.
Cheers,
Don

On Mon, Dec 15, 2008 at 9:05 AM, Scott James Remnant
<email address hidden> wrote:
> On Thu, 2008-12-11 at 19:30 +0000, Don Maghrak wrote:
>
>> I am working on getting the performance analysis tool OpenSpeedShop
>> working on ubuntu 8.10 and had the same issue after running make.
>> I added the line echo="echo" after line 153 (ECHO="echo") and the build is
>> now working fine. Since this appears to be an issue with how libtool
>> is created, will this be corrected in a future update to libtool?
>>
> No.
>
> This is an issue with how the libtool in your *source tree* is created,
> not /usr/bin/libtool.
>
>> My current version is:
>> dpm:~/oss-test/OpenSpeedShop$ libtool --version
>> ltmain.sh (GNU libtool) 2.2.4
>>
> Try ./libtool --version instead of relying on $PATH
>
> Scott
> --
> Scott James Remnant
> <email address hidden>
>
> --
> kdevelop can't compile programs in kde4 (intrepid ibex)
> https://bugs.launchpad.net/bugs/285841
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "kdevelop" source package in Ubuntu: New
> Status in "libtool" source package in Ubuntu: Invalid
>
> Bug description:
> Binary package hint: kdevelop3
>
> I'm on Intrepid Ibex, Kubuntu.
>
> At the moment KDevelop can't compile programs giving me the following error:
>
> cd '/home/uwe/Programming/practice/test/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" make -k
> make all-recursive
> ../libtool: line 832: X--tag=CXX: command not found
> Making all in src
> ../libtool: line 865: libtool: ignoring unknown tag : command not found
> ../libtool: line 832: X--mode=link: command not found
> /bin/bash ../libtool --tag=CXX --mode=link g++ -O0 -g3 -o test main.o
> ../libtool: line 999: *** Warning: inferring the mode of operation is deprecated.: command not found
> ../libtool: line 1000: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
> gcc: no input files
> gcc: no input files
> gcc: no input files
> gcc: no input files
> ../libtool: line 2237: X-O0: command not found
> ../libtool: line 2237: X-g3: command not found
> ../libtool: line 2406: Xtest: command not found
> X: user not authorized to run the X server, aborting.
> ../libtool: line 2418: Xtest: command not found
> ../libtool: line 2426: mkdir /.libs: No such file or directory
> make[2]: Nothing to be done for `all-am'.
> mkdir: cannot create directory `/.libs': Permission denied
> make[2]: *** [test] Error 1
> make[2]: Target `all' not remade because of errors.
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> *** Exited with status: 2 ***
>
> Hope I posted this at the right point.
> KDevelop also says in its version info it was running on KDE3.5.10 but im on Intrepid Ibex and therefore im running KDE4.
>
> Installed version:
> uwe@loopy:~/Programming/practice$ apt-cache policy kdevelop
>...

Read more...

I think I have a workaround to fix this problem:

First I've copied the directory "/usr/share/apps/kdevappwizard/" to "$HOME/.kde/share/apps/". Next I've extract the archive "$HOME/.kde/share/apps/kdevappwizard/template-common/incadmin.tar.gz" and I've replaced the old file "ltmain.sh" with the new one from "/usr/share/libtool/config/ltmain.sh". Then I've packed them again to a new file named "incadmin.tar.gz" and replaced the old archive with the new one. Now the script ltmain.sh creates a current libtool while compilation and my source code compiles without any error.

I have attached my new archive "incadmin.tar.gz" with the new file "ltmain.sh" included. Hope this will help.

Regards,
Christian

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers