Question

I am getting this error when trying to build my app:

make: Wl,-rpath-link,: Command not found

My Makefile looks like this, which is a generated file useing qmake program in the OE toolchain.

    #############################################################################
# Makefile for building: app_qt
# Generated by qmake (2.01a) (Qt 4.8.1) on: Tue Jun 26 17:49:26 2012
# Project:  app_qt.pro
# Template: app
# Command: /usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/qmake -o Makefile ap_qt.pro
#############################################################################

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

CC            = $(OE_QMAKE_CC)
CXX           = $(OE_QMAKE_CXX)
DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS        = -pipe -pipe $(OE_QMAKE_CFLAGS) -fpermissive -O2 -Wall -W -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS      = -pipe -pipe -pipe $(OE_QMAKE_CFLAGS) $(OE_QMAKE_CXXFLAGS) -O2 -O2 -Wall -W -Wall -W -Wall -W -D_REENTRANT $(DEFINES)
INCPATH       = -I/usr/local/oecore-i686/sysroots/armv7ahf-vfp-neon-oe-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -I. -I$(OE_QMAKE_INCDIR_QT)/QtCore -I$(OE_QMAKE_INCDIR_QT)/QtGui -I$(OE_QMAKE_INCDIR_QT) -I. -Isrc -Isrc/screens -Isrc/Lists -Isrc/widgets -Isrc/FileIO -Isrc/communication -IQSerialDevice/src -I.
LINK          = $(OE_QMAKE_LINK)
LFLAGS        = $(OE_QMAKE_LDFLAGS) -Wl,-rpath-link,$(OE_QMAKE_LIBDIR_QT)
LIBS          = $(SUBLIBS)  -L$(OE_QMAKE_LIBDIR_QT) -lQtGuiE -lQtCoreE -lpthread 
AR            = $(OE_QMAKE_AR) cqs
RANLIB        = 
QMAKE         = /usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = $(COPY)
COPY_DIR      = $(COPY) -r
STRIP         = $(OE_QMAKE_STRIP)
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

Does anybody recognize the error and know why it emerges?

Thanks in advance. :)

Was it helpful?

Solution

The error is generated because the variable $(OE_QMAKE_LIBDIR_QT) doesn't exist. So

-Wl,-rpath-link,$(OE_QMAKE_LIBDIR_QT)

becomes

-Wl,-rpath-link,

Are you setting the other variables like $(OE_QMAKE_CC) and $(OE_QMAKE_CXX), and if so, where? You should add the variable above to this list. It should point to the lib subdir of your Qt installation.

This could be for example (here it's Qt version 4.8.0): /usr/local/Trolltech/Qt-4.8.0/lib.

In a local installation in your home directory, it may look like this: ~/qt/Desktop/Qt/4.8.1/gcc/lib.

For Qtopia, you should look in /usr/local/oecore-i686/sysroots...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top