LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2003, 04:51 PM   #1
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Rep: Reputation: 15
Problem with KDevelop


/bin/sh /root/Programming/learnc/admin/missing --run automake --gnu learnc/Makefile
aclocal.m4:3009: your implementation of AM_INIT_AUTOMAKE comes from an
aclocal.m4:3009: old Automake version. You should recreate aclocal.m4
aclocal.m4:3009: with aclocal and run automake again.
gmake: *** [Makefile.in] Error 1
*** failed ***

That's what I recieved when I try to compile a very simple C program. Has anyone experienced with it? How to solve? . Help me!
 
Old 11-15-2003, 05:07 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Open a terminal and do as the smessage suggest, what means
su
(enter root password when asked)
aclocal
Then try to compile the program again.
 
Old 11-16-2003, 09:52 AM   #3
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Original Poster
Rep: Reputation: 15
UMM, I will try, thanks, but is there better way ?
 
Old 11-16-2003, 10:42 AM   #4
Thaith
Member
 
Registered: Oct 2003
Posts: 32

Original Poster
Rep: Reputation: 15
I do as you told, and when I compile, the result is:
cd .. && \
/bin/sh /root/Programming/learnc/admin/missing --run automake-1.6 --gnu learnc/Makefile
cd .. && perl admin/am_edit learnc/Makefile.in
cd .. && /bin/sh ./config.status learnc/Makefile depfiles
config.status: creating learnc/Makefile
config.status: executing depfiles commands
source='temp.c' object='temp.o' libtool=no \
depfile='.deps/temp.Po' tmpdepfile='.deps/temp.TPo' \
depmode=gcc3 /bin/sh ../admin/depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -c `test -f 'temp.c' || echo './'`temp.c
temp.c:22:14: warning: no newline at end of file
*** success ***

It seems OK.
But when I try to execute it, the result is :

gmake all-recursive
gmake[1]: Entering directory `/root/Programming/learnc'
cd . && \
/bin/sh /root/Programming/learnc/admin/missing --run automake-1.6 --foreign Makefile
cd . && perl admin/am_edit Makefile.in
cd . && /bin/sh ./config.status Makefile
config.status: creating Makefile
gmake[1]: Leaving directory `/root/Programming/learnc'
gmake[1]: Entering directory `/root/Programming/learnc'
Making all in learnc
gmake[2]: Entering directory `/root/Programming/learnc/learnc'
Making all in docs
gmake[3]: Entering directory `/root/Programming/learnc/learnc/docs'
cd ../.. && \
/bin/sh /root/Programming/learnc/admin/missing --run automake-1.6 --gnu learnc/docs/Makefile
cd ../.. && perl admin/am_edit learnc/docs/Makefile.in
cd ../.. && /bin/sh ./config.status learnc/docs/Makefile
config.status: creating learnc/docs/Makefile
gmake[3]: Leaving directory `/root/Programming/learnc/learnc/docs'
gmake[3]: Entering directory `/root/Programming/learnc/learnc/docs'
Making all in en
gmake[4]: Entering directory `/root/Programming/learnc/learnc/docs/en'
cd ../../.. && \
/bin/sh /root/Programming/learnc/admin/missing --run automake-1.6 --gnu learnc/docs/en/Makefile
cd ../../.. && perl admin/am_edit learnc/docs/en/Makefile.in
cd ../../.. && /bin/sh ./config.status learnc/docs/en/Makefile
config.status: creating learnc/docs/en/Makefile
gmake[4]: Leaving directory `/root/Programming/learnc/learnc/docs/en'
gmake[4]: Entering directory `/root/Programming/learnc/learnc/docs/en'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/root/Programming/learnc/learnc/docs/en'
gmake[4]: Entering directory `/root/Programming/learnc/learnc/docs'
gmake[4]: Nothing to be done for `all-am'.
gmake[4]: Leaving directory `/root/Programming/learnc/learnc/docs'
gmake[3]: Leaving directory `/root/Programming/learnc/learnc/docs'
gmake[3]: Entering directory `/root/Programming/learnc/learnc'
/bin/sh ../libtool --silent --mode=link gcc -O2 -O0 -g3 -Wall -o learnc temp.o hello.o main.o
hello.o(.text+0x0): In function `main':
/root/Programming/learnc/learnc/hello.c:19: multiple definition of `main'
temp.o(.text+0x0):/root/Programming/learnc/learnc/temp.c:19: first defined here
main.o(.text+0x0): In function `main':
/root/Programming/learnc/learnc/main.c:26: multiple definition of `main'
temp.o(.text+0x0):/root/Programming/learnc/learnc/temp.c:19: first defined here
collect2: ld returned 1 exit status
gmake[3]: *** [learnc] Error 1
gmake[3]: Leaving directory `/root/Programming/learnc/learnc'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/root/Programming/learnc/learnc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/root/Programming/learnc'
gmake: *** [all] Error 2
*** failed ***

How to solve this ? . Sorry if I have bothered you. I am newbie
 
Old 11-16-2003, 03:20 PM   #5
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
/bin/sh ../libtool --silent --mode=link gcc -O2 -O0 -g3 -Wall -o learnc temp.o hello.o main.o
hello.o(.text+0x0): In function `main':
/root/Programming/learnc/learnc/hello.c:19: multiple definition of `main'
temp.o(.text+0x0):/root/Programming/learnc/learnc/temp.c:19: first defined here
main.o(.text+0x0): In function `main':
/root/Programming/learnc/learnc/main.c:26: multiple definition of `main'
temp.o(.text+0x0):/root/Programming/learnc/learnc/temp.c:19: first defined here
collect2: ld returned 1 exit status
The example code you're trying to compile has a mistake. In both hello.c and main.c (and also in temp.c) there's 'main' finction. Their objets are linked and it produces and error, because the result can have only one main functions and there are 3 candidates...
It won't work this way...You need to change it, comment out two mains or do something different. Hard to say without having the sources.

Side note: don't program when you're logged as root! When you're root, a mistake may result in really bad ways. Create a new account and use it for programming (and most other things).
 
Old 11-17-2003, 01:01 AM   #6
Onemessedupjedi
Member
 
Registered: Sep 2003
Location: Oregon
Distribution: Slackware 9.1
Posts: 194

Rep: Reputation: 30
and you could also give permission to your name to write to the directories you know the program will be installing to....however that reduces security greatly because you are allowing anyone and everyone to install anything on your system including a virus...but then again this is linux....
 
Old 02-04-2004, 08:01 AM   #7
Roadhog
LQ Newbie
 
Registered: Jan 2004
Location: under my desk
Posts: 22

Rep: Reputation: 15
Hi Mara,

I tried what you suggested. I am running RH9 with all updates, KDev 2.1.5 and QT 3.1. You obviously know your stuff but I am a MS windows user trapped on teh dark side. Your instructions to me, are not complete. Fine, run terminal, type su, then pwd. When I do this I see an error "need configure.an or configure.in". In KDevelop, I can simply run Autoconf and Automake from the build menu, but this is but a bandaid, does not address the problem at the core. As I would need to do this with every new program I create.

You linux gurus have both my admiration and respect, but you have to cut us MS-Windows newbs who are trying to leave the dark side and learn, some slack.

As I help individuals with MS Windows issues, I treat all as if they know absolutely nothing, I leave out no steps in the process of what I want them to do. I always remember that once, I knew aboslutely nothing about windows, the registry, processes, etc.

Guess I am just frustrated that everywhere I go on the net to get help, information is fragmented and what should be a simple process, becomes an ordeal. This is not an attack on you or the community, just the ramblings of someone who wants to learn, but is tired of locked dorrs.

Roadhog
 
Old 02-04-2004, 03:37 PM   #8
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
First more compilicated mathod - to compile them all by hand (I give it just in case):
Code:
cd /root/Programming/learnc/learnc/
gcc -O2 -g3 -Wall -o temp temp.o
gcc -O2 -g3 -Wall -o hello hello.o
gcc -O2 -g3 -Wall -o main main.o
You should get 3 exacutables.

Now using KDevelop... I don't remember 2.1 well (using 3.x for months now), but there should be something as creating new targets. Target is nothing more as separate executable (not always, but...). You need to create 2 targets - one for every of the 3 files (the first one already exists). When you have the targets created, add the .c files to targets (one .c file for target). When you try to compile it (you need to run automake first) they should compile as 3 executables.

I can't give you simplier advice - I don't have KDevelop 2.x to see where's the option.

Last edited by Mara; 02-04-2004 at 03:40 PM.
 
Old 02-05-2004, 07:18 AM   #9
Roadhog
LQ Newbie
 
Registered: Jan 2004
Location: under my desk
Posts: 22

Rep: Reputation: 15
Thank you Mara,

Coming from a Windows, DevStudio environment, this is all so new as DevStudio definitely makes one lazy. I feel I have leanrt a lot in the last three weeks and have so much more to learn. Mastering the command line and definitely learn emacs are priorities. Just finding the time. And to boot, I am relatively new to C++.

Took a deep breath lastnight and am refocused. Hopefully it will all start to fall together soon.

roadhog
 
Old 02-04-2006, 03:12 PM   #10
escale
LQ Newbie
 
Registered: Apr 2004
Location: Southwest US
Distribution: Got RH9 (Shrike) from Distro that came with Red Hat Linux 9 Bible - Christopher Negus
Posts: 8

Rep: Reputation: 0
Anyone:
I know this thread is probably in the archives, but I too am trying to get KDevelop going on my Linux box.

After encountering the aclocal error, I found this post.
I su to root and executed:
#aclocal
and got this error message:
aclocal: 'configure.ac' or 'configure.in' required
so I typed in
#locate configure.ac
nothing came back so I typed in:
#locate configure.in
and I got a bunch of lines. I noticed that this one in particular caught my interest:
/home/dan/CProg/KDevvProj/firstproj/configure.in
as this was my working Kdevelop directory, so I changed my directory as follows:
#CD /home/dan/CProg/KDevvProj/firstproj
and then executed the statement:
#aclocal
the system didn't return an error message, and appeared to do nothing, so I went back to kdevelop using my usual login in and entered Kdevelop again. My "Hello World" program finally compiled.

This information if for others who may encounter this particular aclocal error and would like to get their KDevelop package running. I don't know what caused the error or why aclocal needs to be run, but this worked for me.

Last edited by escale; 02-04-2006 at 03:15 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KDevelop problem digitalbrutus Linux - Software 0 12-13-2004 01:38 PM
Problem with KDevelop Thaith Red Hat 4 06-10-2004 09:59 PM
KDevelop problem Panzerfrost Linux - Software 3 11-03-2003 03:23 PM
Kdevelop problem Psychostim Programming 1 07-30-2003 06:27 PM
Problem with KDevelop JIV Programming 5 04-28-2003 10:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration