I have configure my rcssmonitor and when I want to make the file it gets this error Can someone help me with?

configure log:

./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for cos in -lm... yes
checking for deflate in -lz... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for int16_t... yes
checking for int32_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for error_at_line... yes
checking for memset... yes
checking for rint... yes
checking for strtol... yes
checking for pow... yes
checking for sqrt... yes
checking for boostlib >= 1.32.0... yes
checking build system type... x86_64-unknown-linux-gnu
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: set QT4_REQUIRED_VERSION... 4.3.0
configure: set QT4_REQUIRED_MODULES... QtCore QtGui QtNetwork
checking for pkg-config... /usr/bin/pkg-config
configure: check QtCore >= 4.3.0
checking for Qt4... yes
configure: check QtGui >= 4.3.0
checking for Qt4... yes
configure: check QtNetwork >= 4.3.0
checking for Qt4... yes
configure: set QT4_CXXFLAGS... -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4/QtCore
configure: set QT4_LDFLAGS... -L/usr/X11R6/lib64
configure: set QT4_LDADD... -pthread-lQtGui -lQtCore -lfontconfig -lpthread -laudio -lXt -lgthread-2.0 -lglib-2.0 -lpng -lz -lfreetype -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXi -lXrender -lfontconfig -lfreetype -lXext -lX11 -lm -lQtNetwork -lQtCore -lfontconfig -lpthread -lz -lQtCore -lfontconfig -lpthread -lz -lm -ldl -lgthread-2.0 -lglib-2.0 -lrt
configure: set QT4_MOC... /usr/share/qt4/bin/moc
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands

make error:

g++-5.real: error: unrecognized command line option ‘-pthread-lQtGui’
Makefile:357: recipe for target 'rcssmonitor' failed
make[2]: *** [rcssmonitor] Error 1
make[2]: Leaving directory '/home/seena/Robocup/rcssmonitor-15.1.1/src'
Makefile:289: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/seena/Robocup/rcssmonitor-15.1.1'
Makefile:229: recipe for target 'all' failed
make: *** [all] Error 2

I'm running ubuntu 16 Can someone please help me to solve my problem?


You need to separate the flags -pthread and -lQtGui. I managed to solve this by using sed to find where the flags were together and separating then after making the configure process. Do a make clean then ./configure and try to make this:

sed -i 's/-pthread-lQtGui/-pthread -lQtGui/' config.status*
sed -i 's/-pthread-lQtGui/-pthread -lQtGui/' Makefile*

After that do a sudo make install and see if it works..

  • Thanks. I just make space between two -pthread and -lQtGui in two make files and make the file normally and it works – Seena Fallah Feb 18 '17 at 16:07

Open the configure file and locate this line:

QT4_LDADD="$($PKG_CONFIG --static --libs-only-other $QT4_REQUIRED_MODULES)$($PKG_CONFIG --static --libs-only-l $QT4_REQUIRED_MODULES)"

Put a space between the $PKG_CONFIG variables, so it will be like this:

QT4_LDADD="$($PKG_CONFIG --static --libs-only-other $QT4_REQUIRED_MODULES) $($PKG_CONFIG --static --libs-only-l $QT4_REQUIRED_MODULES)"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.