CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2010
    Posts
    0

    what does this error means, please?

    Hi there,
    I came across the following error, using intel compiler.

    [user12@onion axyinversion3D]$ make
    cd src && make -f Makefile
    make[1]: Entering directory `/src/dev/dev/axyinversion3D/axyinversion3D/src'
    test -d ../bin/ || mkdir -p ../bin/
    g++ -o ../bin/axyinversion3d cxmlmenu.o axyinversion3d.o axyinversion3Dmain.o -L/rc/apps/intel/fc/9.1.036/libstatic -L../lib -L/usr/lib64/qt-3.3/lib -L/usr/X11R6/lib -laxyinversion -lifport -lifcore -limf -lcxa -lirc -lunwind -lc -lirc_s -lseisio -lqt-mt -lXext -lX11 -lm
    /usr/bin/ld: skipping incompatible ../lib/libaxyinversion.a when searching for -laxyinversion
    /usr/bin/ld: cannot find -laxyinversion
    collect2: ld returned 1 exit status
    make[1]: *** [../bin/axyinversion3d] Error 1
    make[1]: Leaving directory `/src/dev/dev/axyinversion3D/axyinversion3D/src'
    make: *** [sub-src] Error 2

    I have developed on C, that call F90 routines on a hedrat 5.3
    Everything works fine on my old machine that I lost recently. I set up a new machine with the same compiler and directory structure, but I am very low on scripts.
    The same project worked fine on my old machine. Inside of the main project O have a "lib" directory,where I have the f90 routines, tha I compile with a makeLibF script, that works fine:

    rm libavoinversion.a
    ifort -c -nofor_main -free angle_psv.f ap_avopsv.f calc_psv.f comp_svel.f get_psv.f hunt.f
    ar rvs libavoinversion.a angle_psv.o ap_avopsv.o calc_psv.o comp_svel.o get_psv.o hunt.o

    rm *.o
    #-no-ipo -parallel -nofor_main -free

    [user12@onion lib]$ ./makeLibF
    ar: creating libaxyinversion.a
    a - angle_psv.o
    a - ap_axypsv.o
    a - calc_psv.o
    a - comp_svel.o
    a - get_psv.o
    a - hunt.o

    There is also an src directory, inside the maind project directory with the C codes.
    When I get back to the main directory of the project and do "make" i had the following error message:

    [user12@onion axyinversion3D]$ make
    cd src && make -f Makefile
    make[1]: Entering directory `/src/dev/dev/axyinversion3D/axyinversion3D/src'
    test -d ../bin/ || mkdir -p ../bin/
    g++ -o ../bin/axyinversion3d cxmlmenu.o axyinversion3d.o axyinversion3Dmain.o -L/rc/apps/intel/fc/9.1.036/libstatic -L../lib -L/usr/lib64/qt-3.3/lib -L/usr/X11R6/lib -laxyinversion -lifport -lifcore -limf -lcxa -lirc -lunwind -lc -lirc_s -lseisio -lqt-mt -lXext -lX11 -lm
    /usr/bin/ld: skipping incompatible ../lib/libaxyinversion.a when searching for -laxyinversion
    /usr/bin/ld: cannot find -laxyinversion
    collect2: ld returned 1 exit status
    make[1]: *** [../bin/axyinversion3d] Error 1
    make[1]: Leaving directory `/src/dev/dev/axyinversion3D/axyinversion3D/src'
    make: *** [sub-src] Error 2

    I dont understend where is the error, The makefile is bellow, and thank you so much.






    #############################################################################
    # Makefile for building: ../bin/axyinversion3d
    # Generated by qmake (1.07a) (Qt 3.3.3) on: Fri Mar 27 10:47:25 2009
    # Project: src.pro
    # Template: app
    # Command: $(QMAKE) -o Makefile src.pro
    #############################################################################

    ####### Compiler, tools and options

    CC = gcc
    CXX = g++
    LEX = flex
    YACC = yacc
    CFLAGS = -pipe -Wall -W -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT
    CXXFLAGS = -pipe -Wall -W -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT
    LEXFLAGS =
    YACCFLAGS= -d
    INCPATH = -I/usr/lib/qt-3.3/mkspecs/default -I. -I$(QTDIR)/include
    LINK = g++
    LFLAGS =
    LIBS = $(SUBLIBS) -L/rc/apps/intel/fc/9.1.036/libstatic -L../lib -L$(QTDIR)/lib -L/usr/X11R6/lib -laxyinversion -lifport -lifcore -limf -lcxa -lirc -lunwind -lc -lirc_s -lseisio -lqt-mt -lXext -lX11 -lm
    AR = ar cqs
    RANLIB =
    MOC = $(QTDIR)/bin/moc
    UIC = $(QTDIR)/bin/uic
    QMAKE = qmake
    TAR = tar -cf
    GZIP = gzip -9f
    COPY = cp -f
    COPY_FILE= $(COPY)
    COPY_DIR = $(COPY) -r
    INSTALL_FILE= $(COPY_FILE)
    INSTALL_DIR = $(COPY_DIR)
    DEL_FILE = rm -f
    SYMLINK = ln -sf
    DEL_DIR = rmdir
    MOVE = mv -f
    CHK_DIR_EXISTS= test -d
    MKDIR = mkdir -p

    ####### Output directory

    OBJECTS_DIR = ./

    ####### Files

    HEADERS = cxmlmenu.h \
    seisio.h \
    libaxyinversion.h \
    axyinversion3Dmain.h \
    axyinversion3Dwork.h
    SOURCES = cxmlmenu.cpp \
    axyinversion3d.cpp \
    axyinversion3Dmain.cpp
    OBJECTS = cxmlmenu.o \
    axyinversion3d.o \
    axyinversion3Dmain.o
    FORMS =
    UICDECLS =
    UICIMPLS =
    SRCMOC =
    OBJMOC =
    DIST = src.pro
    QMAKE_TARGET = axyinversion3d
    DESTDIR = ../bin/
    TARGET = ../bin/axyinversion3d

    first: all
    ####### Implicit rules

    .SUFFIXES: .c .o .cpp .cc .cxx .C

    .cpp.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

    .cc.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

    .cxx.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

    .C.o:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

    .c.o:
    $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

    ####### Build rules

    all: Makefile $(TARGET)

    $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC)
    test -d ../bin/ || mkdir -p ../bin/
    $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)

    mocables: $(SRCMOC)
    uicables: $(UICDECLS) $(UICIMPLS)

    $(MOC):
    ( cd $(QTDIR)/src/moc && $(MAKE) )

    Makefile: src.pro /usr/lib/qt-3.3/mkspecs/default/qmake.conf /usr/lib/qt-3.3/lib/libqt-mt.prl
    $(QMAKE) -o Makefile src.pro
    qmake:
    @$(QMAKE) -o Makefile src.pro

    dist:
    @mkdir -p .tmp/axyinversion3d && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/axyinversion3d/ && ( cd `dirname .tmp/axyinversion3d` && $(TAR) axyinversion3d.tar axyinversion3d && $(GZIP) axyinversion3d.tar ) && $(MOVE) `dirname .tmp/axyinversion3d`/axyinversion3d.tar.gz . && $(DEL_FILE) -r .tmp/axyinversion3d

    mocclean:

    uiclean:

    yaccclean:
    lexclean:
    clean:
    -$(DEL_FILE) $(OBJECTS)
    -$(DEL_FILE) *~ core *.core


    ####### Sub-libraries

    distclean: clean
    -$(DEL_FILE) ../bin/$(TARGET) $(TARGET)


    FORCE:

    ####### Compile

    cxmlmenu.o: cxmlmenu.cpp cxmlmenu.h

    axyinversion3d.o: axyinversion3d.cpp seisio.h \
    libaxyinversion.h

    axyinversion3Dmain.o: axyinversion3Dmain.cpp

    ####### Install

    install:

    uninstall:

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: what does this error means, please?

    Quote Originally Posted by lloures View Post
    /usr/bin/ld: skipping incompatible ../lib/libaxyinversion.a when searching for -laxyinversion
    For whatever reason, this library was compiled to incompatible machine code with the executable source you're trying to link it to. Perhaps the executable is being compiled for 64-bit but the library is 32-bit. Perhaps it was built for a different distro of Linux. I'm not going to take the time to look through all the command lines to figure it out; but maybe that gives you a place to start.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured