LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-08-2013, 02:55 PM   #1
shumbamajachani
LQ Newbie
 
Registered: May 2011
Posts: 9

Rep: Reputation: 0
cc: error: unrecognized command line option ‘-m-L../lib’


I am trying to install a program...when i type make after compressing the .gz file ...I got the following message...

the error message in summary reads as

cc: error: unrecognized command line option ‘-m-L../lib’

I have the c-compiler installed...where am i getting wrong

Blessing



a - filter/complex.o
a - saccut/saccut_subs.o
a - sacextrema/sacextrema.o
a - source/source_subs.o
a - timesubs.o
a - modsubs.o
a - misc_tools/distaz.o
a - misc_tools/ampshift.o
a - misc_tools/fmul.o
a - taper/taper_subs.o
a - rotate/rotate.o
a - math/math.o
a - crosscorrelation/cross_correlation.o
a - tdif/Differentiates.o
a - shift/shift.o
a - random/ransubs.o
mv libglib.a ../lib
mv: try to overwrite ‘../lib/libglib.a’, overriding mode 0644 (rw-r--r--)? y
ranlib ../lib/libglib.a
f77 -o mkgrnlib mkgrnlib.o wrtgrn2sac.o stasubs.o greensf.o besasy.o bessel.o cinv2.o fork.o genrefl.o timesubs.o modsubs.o misc_tools/distaz.o -lm -L../lib -lget
getopt: invalid option -- 'l'
getopt: invalid option -- 'l'
getopt: invalid option -- 'e'
getopt: option requires an argument -- 't'
cc: error: unrecognized command line option ‘-m-L../lib’
mv mkgrnlib ../bin
mv: cannot stat ‘mkgrnlib’: No such file or directory
make[1]: *** [mkgrnlib] Error 1
make[1]: Leaving directory `/home/blessing/Documents/softwares/mtinv.v2.0/src'
for dir in misc/sacmerge misc/sacswapbytes ; do cd $dir ; make all ; cd ../../ ; done
make[1]: Entering directory `/home/blessing/Documents/softwares/mtinv.v2.0/misc/sacmerge'
for dir in src ; do cd $dir ; make all ; cd .. ; done
make[2]: Entering directory `/home/blessing/Documents/softwares/mtinv.v2.0/misc/sacmerge/src'
gcc -O -I../../../include -o sacmerge sacmerge.o -L../../../lib -lglib -lm -lget
 
Old 02-08-2013, 05:04 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Ref. your other thread with the same subject :
http://www.linuxquestions.org/questi...-a-4175448485/
... You will still have to tell which software it's about.
See post # 2, @TB0ne

-
 
1 members found this post helpful.
Old 02-08-2013, 07:36 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
‘-m-L../lib’
????

that looks really messed up

try
" -lm "
without the two ""
 
2 members found this post helpful.
Old 02-09-2013, 03:40 AM   #4
shumbamajachani
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
cc: error: unrecognized command line option ‘-m-L../lib’

here is the code which is giving me sleepless nights....... I assume when you said i should change to -lm...you were referring to
the section marked in bold below... i did that and after that i was getting the error as cc: error: unrecognized command line option ‘-m../lib’

Any other ideas....

Thanks

CC = cc
FC = f77
INCLUDE = -I../include
GRN_LIBS = -lm -L../lib -lglib -lget
PLOT_LIBS = -L../lib -lcgraph
INSTALL = ../bin

CFLAGS = -g $(INCLUDE)
FFLAGS =

.c.o :
$(CC) $(CFLAGS) -c $< -o $@
.f.o :
$(FC) $(FFLAGS) -c $< -o $@

EXEC = libglib mkgrnlib grnlib2sac glib2inv sacdata2inv mtinv makepar pltmod

all : $(EXEC)

OBJS0 = rtrend/rtrend_sac.o \
transfer/transfersubs.o transfer/fftsub.o \
interpolate/interpolate_subs.o \
filter/filtersubs.o filter/complex.o \
saccut/saccut_subs.o \
sacextrema/sacextrema.o \
source/source_subs.o \
timesubs.o \
modsubs.o \
misc_tools/distaz.o misc_tools/ampshift.o misc_tools/fmul.o \
taper/taper_subs.o \
rotate/rotate.o \
math/math.o \
crosscorrelation/cross_correlation.o \
tdif/Differentiates.o \
shift/shift.o \
random/ransubs.o

libglib : $(OBJS0)
ar -rv libglib.a $(OBJS0)
mv libglib.a ../lib
ranlib ../lib/libglib.a

OBJS1 = mkgrnlib.o wrtgrn2sac.o stasubs.o greensf.o besasy.o bessel.o cinv2.o fork.o \
genrefl.o timesubs.o modsubs.o misc_tools/distaz.o

mkgrnlib : $(OBJS1)
$(FC) $(FFLAGS) -o $@ $(OBJS1) -lm -L../lib -lget
mv $@ $(INSTALL)

OBJS2 = grnlib2sac.o wrtgrn2sac.o random/ransubs.o source/source_subs.o
grnlib2sac : $(OBJS2)
$(CC) $(CFLAGS) -o $@ $(OBJS2) -lm -L../lib -lget
mv $@ $(INSTALL)

OBJS3 = sacdata2inv.o sacdata2inv_subs.o glib2inv_subs.o getrespfile_sub.o
sacdata2inv : $(OBJS3)
$(CC) $(CFLAGS) -o $@ $(OBJS3) -lm -L../lib -lglib -lget
mv $@ $(INSTALL)

OBJS4 = glib2inv.o glib2inv_subs.o wrtgrn2sac.o
glib2inv : $(OBJS4)
$(CC) $(CFLAGS) -o $@ $(OBJS4) -lm -L../lib -lglib -lget
mv $@ $(INSTALL)

MTINV_SUBS= mtinv.o glib2inv_subs.o svbksb.o svdcmp.o tred2.o tqli.o trans1.o tpdss.o \
mtinv_subs.o ascii_mech.o psplot.o svdvar.o psmech.o make_amatrix.o indexx.o
mtinv : $(MTINV_SUBS)
$(CC) $(CFLAG) -o $@ $(MTINV_SUBS) $(GRN_LIBS) $(PLOT_LIBS)
mv $@ $(INSTALL)

makepar : makepar.o indexx.o
$(CC) $(CFLAG) -o $@ makepar.o indexx.o -lm -L../lib -lget
mv $@ $(INSTALL)

pltmod : pltmod.o modsubs.o
$(CC) $(CFLAG) -o $@ pltmod.o modsubs.o -lm -L../lib -lget
mv $@ $(INSTALL)

clean :
rm -f *.o */*.o
 
Old 02-09-2013, 06:57 AM   #5
shumbamajachani
LQ Newbie
 
Registered: May 2011
Posts: 9

Original Poster
Rep: Reputation: 0
cc: error: unrecognized command line option ‘-m-L../lib’

Quote:
Originally Posted by John VV View Post
????

that looks really messed up

try
" -lm "
without the two ""
here is the code which is giving me sleepless nights....... I assume when you said i should change to -lm...you were referring to
the section marked in bold below... i did that and after that i was getting the error as cc: error: unrecognized command line option ‘-m../lib’

Any other ideas....

Thanks

CC = cc
FC = f77
INCLUDE = -I../include
GRN_LIBS = -lm -L../lib -lglib -lget
PLOT_LIBS = -L../lib -lcgraph
INSTALL = ../bin

CFLAGS = -g $(INCLUDE)
FFLAGS =

.c.o :
$(CC) $(CFLAGS) -c $< -o $@
.f.o :
$(FC) $(FFLAGS) -c $< -o $@

EXEC = libglib mkgrnlib grnlib2sac glib2inv sacdata2inv mtinv makepar pltmod

all : $(EXEC)

OBJS0 = rtrend/rtrend_sac.o \
transfer/transfersubs.o transfer/fftsub.o \
interpolate/interpolate_subs.o \
filter/filtersubs.o filter/complex.o \
saccut/saccut_subs.o \
sacextrema/sacextrema.o \
source/source_subs.o \
timesubs.o \
modsubs.o \
misc_tools/distaz.o misc_tools/ampshift.o misc_tools/fmul.o \
taper/taper_subs.o \
rotate/rotate.o \
math/math.o \
crosscorrelation/cross_correlation.o \
tdif/Differentiates.o \
shift/shift.o \
random/ransubs.o

libglib : $(OBJS0)
ar -rv libglib.a $(OBJS0)
mv libglib.a ../lib
ranlib ../lib/libglib.a

OBJS1 = mkgrnlib.o wrtgrn2sac.o stasubs.o greensf.o besasy.o bessel.o cinv2.o fork.o \
genrefl.o timesubs.o modsubs.o misc_tools/distaz.o

mkgrnlib : $(OBJS1)
$(FC) $(FFLAGS) -o $@ $(OBJS1) -lm -L../lib -lget
mv $@ $(INSTALL)

OBJS2 = grnlib2sac.o wrtgrn2sac.o random/ransubs.o source/source_subs.o
grnlib2sac : $(OBJS2)
$(CC) $(CFLAGS) -o $@ $(OBJS2) -lm -L../lib -lget
mv $@ $(INSTALL)

OBJS3 = sacdata2inv.o sacdata2inv_subs.o glib2inv_subs.o getrespfile_sub.o
sacdata2inv : $(OBJS3)
$(CC) $(CFLAGS) -o $@ $(OBJS3) -lm -L../lib -lglib -lget
mv $@ $(INSTALL)

OBJS4 = glib2inv.o glib2inv_subs.o wrtgrn2sac.o
glib2inv : $(OBJS4)
$(CC) $(CFLAGS) -o $@ $(OBJS4) -lm -L../lib -lglib -lget
mv $@ $(INSTALL)

MTINV_SUBS= mtinv.o glib2inv_subs.o svbksb.o svdcmp.o tred2.o tqli.o trans1.o tpdss.o \
mtinv_subs.o ascii_mech.o psplot.o svdvar.o psmech.o make_amatrix.o indexx.o
mtinv : $(MTINV_SUBS)
$(CC) $(CFLAG) -o $@ $(MTINV_SUBS) $(GRN_LIBS) $(PLOT_LIBS)
mv $@ $(INSTALL)

makepar : makepar.o indexx.o
$(CC) $(CFLAG) -o $@ makepar.o indexx.o -lm -L../lib -lget
mv $@ $(INSTALL)

pltmod : pltmod.o modsubs.o
$(CC) $(CFLAG) -o $@ pltmod.o modsubs.o -lm -L../lib -lget
mv $@ $(INSTALL)

clean :
rm -f *.o */*.o
 
Old 02-09-2013, 08:53 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by shumbamajachani View Post
here is the code which is giving me sleepless nights....... I assume when you said i should change to -lm...you were referring to the section marked in bold below... i did that and after that i was getting the error as cc: error: unrecognized command line option ‘-m../lib’

Any other ideas....
Posting the same thing more than once, asking the same question more than once, and bumping your own thread after a few hours, does NOT make anyone want to answer you faster (or at all).

The error is VERY clear...it's telling you what the problem is; have you LOOKED at what you posted??
Quote:
Originally Posted by shumbamajachani
unrecognized command line option ‘-m-L../lib’
It says that the "-m-L../lib" option is invalid. What you do to correct it, is to put a VALID option in (or correct the syntax), or remove the bad option. And AGAIN, as we asked in your other thread...what software is this, and where did you get it?
 
Old 02-09-2013, 12:05 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
I am trying to install a program...when i type make after compressing the .gz file ...I got the following message...
the name of this program ,and a link to the source would greatly help
Also the operating system

you have a SUSE icon under your name BUT
what version is it ?
OLNY openSUSE 12.1 and 12.2 are supported
and SELD 11 service pack ( up to 2 i think it is )

-----
from the other post on this
http://www.linuxquestions.org/questi...-a-4175448485/
---------------
it is opensuse 12.2
and the program is "mtinv.v2."

as to just where this code is from
-- some googling ??-- this night NOT be what you are building
--- git hub ---
https://github.com/socallaghan/geoML/tree/master/mtinv
if it is the mtinv is part of the bigger package "geoML-master.zip"


also what version of gcc is used ?
4.1,4.3,4.6,4.7 ?

opensuse 12.2 uses gcc 4.7
not a lot of "lab/ scientific" code will YET build on the new version of gcc

you might need to install gcc 4.3 from the "Open Build System " for SUSE

form the library lines
Quote:
GRN_LIBS = -lm -L../lib -lglib -lget
PLOT_LIBS = -L../lib -lcgraph
you HAVE PREBUILT ( or versions of libs that NEED building in the folder one up from the build folder "../lib"

that right there might cause all kinds of problems if this is
OLD code on a new OS
or
NEW code on a OLD os
 
  


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
ffmpeg: unrecognized option '-vf' Error krunal202 Linux - Software 4 10-28-2012 05:31 PM
[SOLVED] run ps|grep command by script/command line ... ERROR: Unsupported option (BSD syntax) masuch Programming 4 05-23-2012 04:13 AM
use gcc command to compile a *.c file error:unrecognized option '--eh-frame-hdr' just2012 Linux - Software 2 06-30-2011 10:19 AM
cc1: error: unrecognized command line option "-mapcs-32" vengat Linux - Hardware 0 04-29-2008 02:18 AM
unrecognized command line option "-mapcs-32" vengat Linux - Hardware 1 04-26-2008 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:45 PM.

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