LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-07-2007, 09:17 PM   #1
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Rep: Reputation: 15
Makefile Error: Unknown file type


Hi,

I am trying to parse INI file !!! And using the INI parser given on the web by Nicholas Devillard's INI parser.

I tried running it on the server and did a Make and got the following error:

Code:
compiling src/iniparser.c ...
compiling src/dictionary.c ...
compiling src/strlib.c ...
r - iniparser.o
r - dictionary.o
r - strlib.o
ar: writing libiniparser.a
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file /usr/lib: unknown file type
ld: fatal: File processing errors. No output written to libiniparser.so.0
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libiniparser.so'
Here is my Makefile

Code:
#
# iniparser Makefile
#

# Compiler settings
CC      = gcc
CFLAGS  = -O3 -fPIC

# Ar settings to build the library
AR          = ar
ARFLAGS = rcv

SHLD = ${CC} ${CFLAGS}
LDSHFLAGS = -shared -Wl,-Bsymbolic  -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib

# Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
# RANLIB  = ranlib
RANLIB = true

RM      = rm -f


# Implicit rules

SUFFIXES = .o .c .h .a .so .sl

COMPILE.c=$(CC) $(CFLAGS) -c
.c.o:
        @(echo "compiling $< ...")
        @($(COMPILE.c) -o $@ $<)


SRCS = src/iniparser.c \
           src/dictionary.c \
           src/strlib.c

OBJS = $(SRCS:.c=.o)


default:        libiniparser.a libiniparser.so

libiniparser.a: $(OBJS)
        @($(AR) $(ARFLAGS) libiniparser.a $(OBJS))
        @($(RANLIB) libiniparser.a)

libiniparser.so:        $(OBJS)
        @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
                -Wl,-soname=`basename $@`.0

clean:
        $(RM) $(OBJS)

veryclean:
        $(RM) $(OBJS) libiniparser.a libiniparser.so*
        rm -rf ./html ; mkdir html
        cd test ; $(MAKE) veryclean

docs:
        @(cd doc ; $(MAKE))

check:
        @(cd test ; $(MAKE))
~                                                                                                                                                                                                                
"Makefile" 63 lines, 1099 characters
PLZ help....
 
Old 10-12-2007, 01:47 PM   #2
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
/usr/lib is a directory. It could be there's a null environment variable at work, like $FILE that was not initialized properly.
 
  


Reply

Tags
file, makefile, type, unknown


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mkbootdisk : Unknown file type (unallocated) Hitboxx Fedora 2 03-05-2007 07:22 AM
mount: unknown filesystem type 'devfs' error kushalkoolwal Debian 22 03-14-2006 04:14 AM
Autopackage broke my GNOME unknown file type icon ! ghaefb Linux - Software 2 08-15-2005 11:00 AM
GCC Make error on Solarias 2.8: libc.a unknown file type vinaybms Solaris / OpenSolaris 1 06-20-2005 01:56 AM
Gimp - jpg - unknown file type Wynd Linux - Software 1 06-27-2004 11:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:26 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