LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Makefile: file not recognized:File format not recognized collect2: ld returned 1 exit (http://www.linuxquestions.org/questions/linux-software-2/makefile-file-not-recognized-file-format-not-recognized-collect2-ld-returned-1-exit-798283/)

Bringo 03-27-2010 01:51 PM

Makefile: file not recognized:File format not recognized collect2: ld returned 1 exit
 
Hello folks, I was installing DYMOUM from http://masimum.dif.um.es/?Software:DYMOUM in ns-2.34. "make" command is issuing this error:
Code:

...
...
common/main-monolithic.o dymoum/libdymoum.a Makefile -L/ns-allinone-2.34/tclcl-1.19 -ltclcl -L/ns-allinone-2.34/otcl -lotcl -L/ns-allinone-2.34/lib -ltk8.4 -L/ns-allinone-2.34/lib -ltcl8.4 -lXext -lX11 -lnsl -ldl -lm -lm -Ldymoum -ldymoum
Makefile: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [ns] Error 1

Prior to this, ns-2.34 was working fine. Patches are applied very well.
I am in under fedora 9 and:
Code:

gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

I am unable to figure out what is this an issue of.

Bringo 03-27-2010 03:00 PM

I guess I have to extract (or do something like that with) the file "libdymoum.a" before giving "make" command. What are your opinions guys ?

Bringo 03-31-2010 11:59 AM

I have now installed the same dymoum in ns-2.29 under the same system. Do someone has any ideas what goes wrong when I try to install dymoum in ns-2.34 ?

ochikage 05-27-2010 10:26 PM

Makefile has a problem
 
Hi,

I installed ns-2.34 and DYMOUM on Ubuntu 10.04 and I also had a same problem.

In short, L409 of ns-2.34/Makefile is wrong, I guess.

Quote:

# DYMO_UM
$(NS): $(DYMO_UM_DIR)/$(DYMO_UM_LIB) $(OBJ) common/tclAppInit.o Makefile
$(LINK) $(LDFLAGS) $(LDOUT)$@ \
common/tclAppInit.o $(OBJ) $(LIB)
Delete the statement "Makefile" as follows,

Quote:

# DYMO_UM
$(NS): $(DYMO_UM_DIR)/$(DYMO_UM_LIB) $(OBJ) common/tclAppInit.o
$(LINK) $(LDFLAGS) $(LDOUT)$@ \
common/tclAppInit.o $(OBJ) $(LIB)
then, run "make clean" and "make". This had DYMOUM work in my environment.

Makefile is re-writed when you configure. So, it's better to modify Makefile.in or pach file.

Bringo 05-28-2010 03:14 PM

Thanks ochikage.

yat81 12-19-2010 05:40 AM

do u guys applying a patch that they provide? my ns does not work when i try to install DYMO and i have to delete folder path everything, and install ns2.34 again from scratch because of the DYMO problem....

if u guys have any manual, appreciate it...

honeybadger 12-19-2010 07:26 AM

Did you try './configure' before running make?
If the Makefile is not there or not created then try 'automake' after deleting the orignal Makefile.

knudfl 12-19-2010 10:58 AM

@ yat81, post # 6 : Welcome to LQ.

http://masimum.dif.um.es/?Software:DYMOUM:Patches
The patch is dymoum ported to ns-2.34.

Example : Starting from scratch with a "clean" ns-allinone-2.34/ :
mv dymoum_ns-2.34_v0.3.patch ns-allinone-2.34/ns-2.34/
cd ns-allinone-2.34/ns-2.34/
patch -p1 dymoum_ns-2.34_v0.3.patch
tar xvf dynoum-0.3.tar.gz
ln -s dynoum-0.3/ dynoum
cd .. && ./install
.. is supposed to work.

EDIT : Compiles OK in ns-2.33, but not ns-2.34.
Stops with: File format not recognized (libdymoum.a ?).
..

yat81 12-20-2010 04:06 AM

well i follow the instruction from the website, but when i apply the patch, some of the patch said 'hunk failed'...but i proceed with ./configure, make distclean, ./configure and make, and it has some error (it even doesn't recognised the ns command), i try it two times, but will try it later and post the error message...

yat81 12-20-2010 04:08 AM

Quote:

Originally Posted by knudfl (Post 4196848)
@ yat81, post # 6 : Welcome to LQ.

http://masimum.dif.um.es/?Software:DYMOUM:Patches
The patch is dymoum ported to ns-2.34.

Example : Starting from scratch with a "clean" ns-allinone-2.34/ :
mv dymoum_ns-2.34_v0.3.patch ns-allinone-2.34/ns-2.34/
cd ns-allinone-2.34/ns-2.34/
patch -p1 dymoum_ns-2.34_v0.3.patch
tar xvf dynoum-0.3.tar.gz
ln -s dynoum-0.3/ dynoum
cd .. && ./install
.. is supposed to work.

EDIT : Compiles OK in ns-2.33, but not ns-2.34.
Stops with: File format not recognized (libdymoum.a ?).
..

shouldn't it be patch -p1 < dymoum_ns-2.34_v0.3.patch ?


All times are GMT -5. The time now is 08:47 AM.