Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Won't compile on Raspbian Buster #111

Closed
DaFunkShun opened this issue May 15, 2020 · 15 comments
Closed

Won't compile on Raspbian Buster #111

DaFunkShun opened this issue May 15, 2020 · 15 comments

Comments

@DaFunkShun
Copy link

I can compile perfectly on my Ubuntu machine but make fails on Raspbian Buster on the Raspberry Pi4.

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerdpad.cpp.o:(.data.rel.ro+0x0): multiple definition of typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x5c): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerdpad.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x68): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerdpad.cpp.o:(.rodata+0x78): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0xe8): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerdpad.cpp.o:(.rodata+0x90): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0x100): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerset.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x5c): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerset.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x68): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerset.cpp.o:(.rodata+0x130): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0xe8): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/gamecontrollerset.cpp.o:(.rodata+0x148): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0x100): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/xml/gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x5c): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/xml/gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x68): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/xml/gamecontrollerdpadxml.cpp.o:(.rodata+0x6c): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0xe8): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/gamecontroller/xml/gamecontrollerdpadxml.cpp.o:(.rodata+0x84): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0x100): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/xml/setjoystickxml.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x5c): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/xml/setjoystickxml.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.data.rel.ro+0x68): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/xml/setjoystickxml.cpp.o:(.rodata+0xa0): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0xe8): first defined here

/usr/bin/ld: CMakeFiles/antilib.dir/src/xml/setjoystickxml.cpp.o:(.rodata+0xb8): multiple definition of `typeinfo name for JoyDPadXml'; CMakeFiles/antilib.dir/src/gamecontroller/xml/moc_gamecontrollerdpadxml.cpp.o:(.rodata+0x100): first defined here

collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/antilib.dir/build.make:4326: libantilib.so] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/antilib.dir/all] Fehler 2
`
What am I doing wrong?

@juliagoda
Copy link
Owner

Do you use any other flags when compiling with CMake? Could you give me a version of the dependencies on this system - version of CMake, Qt and so on?

@DaFunkShun
Copy link
Author

I did not use any other flags.

g++ (Raspbian 8.3.0-6+rpi1) 8.3.0
cmake 3.13.4
extra-cmake-modules 5.54.0-1
qttools5-dev 5.11.3-4
qttools5-dev-tools 5.11.3-4
libsdl2-dev 2.0.9+dfsg1-1+rpt1
libxi-dev 2:1.7.9-1
libxtst-dev 2:1.2.3-1
libx11-dev 2:1.6.7-1
itstool 2.0.5-2
gettext 0.19.8.1
libqt5x11extras5-dev 5.11.3-2

This is a fresh install of Raspbian.

@juliagoda juliagoda added the bug Something isn't working label May 26, 2020
@juliagoda
Copy link
Owner

If it is a freshly installed system, that means that you don't have a native g++. Other users had similar problems, but after installing native version, everything worked. Maybe you should try?

@DaFunkShun
Copy link
Author

I updated to gcc-10.1.0 and issued the cmake with following flags:

cmake -D CMAKE_C_COMPILER=gcc-10.1 -D CMAKE_CXX_COMPILER=g++-10.1 ..

No luck so far. Now it complains that it can't find X11, which is installed.

-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: /opt/gcc-10.1.0/bin/gcc-10.1
-- Check for working C compiler: /opt/gcc-10.1.0/bin/gcc-10.1 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/gcc-10.1.0/bin/g++-10.1
-- Check for working CXX compiler: /opt/gcc-10.1.0/bin/g++-10.1 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Checking for module 'sdl2'
-- Found sdl2, version 2.0.9
CMake Error at /usr/share/cmake-3.13/Modules/FindX11.cmake:429 (message):
Could not find X11
Call Stack (most recent call first):
CMakeLists.txt:92 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/pi/Downloads/antimicroX/build/CMakeFiles/CMakeOutput.log".

@juliagoda
Copy link
Owner

Could you check, where libx11 is installed on Rapsberry? What are the paths? For example libX11.so, Xlib.h

@DaFunkShun
Copy link
Author

./usr/lib/arm-linux-gnueabihf/libX11.so
./usr/include/X11/Xlib.h

Hope this helps.

@juliagoda
Copy link
Owner

The first one is interesting. I'll deal with this on Monday

@juliagoda
Copy link
Owner

How is it now?

@DaFunkShun
Copy link
Author

DaFunkShun commented Jun 8, 2020

It finds X11 now and throws the next error. This seems to become a never ending story :(

$ cmake -D CMAKE_C_COMPILER=gcc-10.1 -D CMAKE_CXX_COMPILER=g++-10.1 ..

-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: /opt/gcc-10.1.0/bin/gcc-10.1
-- Check for working C compiler: /opt/gcc-10.1.0/bin/gcc-10.1 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/gcc-10.1.0/bin/g++-10.1
-- Check for working CXX compiler: /opt/gcc-10.1.0/bin/g++-10.1 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Checking for module 'sdl2'
-- Found sdl2, version 2.0.9
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/arm-linux-gnueabihf/libX11.so
XTest support allowed for simulating events.
uinput support allowed for simulating events.
CMake Error at CMakeLists.txt:437 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.

-- Configuring incomplete, errors occurred!
See also "/home/pi/Downloads/antimicroX/build/CMakeFiles/CMakeOutput.log".

There is no package named "Qt5Widgets" in the raspbian repos that I could install.

@juliagoda
Copy link
Owner

Do you have a package like "qtbase5-dev" maybe?

@DaFunkShun
Copy link
Author

DaFunkShun commented Jun 8, 2020

Unfortunately not. These are all the available qt5 packages

qt5-assistant
qt5ct
qt5ct-dbgsym
qt5-default
qt5-doc
qt5-doc-html
qt5dxcb-plugin
qt5-flatpak-platformtheme
qt5-gtk-platformtheme
qt5-image-formats-plugins
qt5keychain-dev
qt5qevercloud-dev
qt5-qmake
qt5-qmake-bin
qt5-qmltooling-plugins
qt5serialport-examples
qt5-style-kvantum
qt5-style-kvantum-l10n
qt5-style-kvantum-themes
qt5-style-plugins
qt5-style-plugins-dbgsym

Trying to install native QT5 on this Raspbian now but compilation will take overnight. Reporting back when it's done tomorrow after work.

@DaFunkShun
Copy link
Author

Trying to install native QT5 on Raspbian just introduces more problems than it solves and turned out to be a silly idea.

@juliagoda
Copy link
Owner

I've found some links and I don't have any other ideas. The problem goes far beyond the problems of the programme itself

https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

https://www.tal.org/tutorials/building-qt-512-raspberry-pi

@juliagoda juliagoda removed the bug Something isn't working label Jun 16, 2020
@Zorlin
Copy link

Zorlin commented Jun 23, 2020

Hi @DaFunkShun

I updated to gcc-10.1.0 and issued the cmake with following flags:

How'd you manage that? I'm trying to get antimicroX working on a Raspberry Pi 3B+ running Raspbian Buster... make failed the same way as you.

@sirlucjan
Copy link
Contributor

sirlucjan commented Jun 23, 2020

If there is no suitable package/library in the Raspbian repository, maybe it would be worthwhile to report the need for one? I don't think that the developer of the program has to deal with the lack of such a package/library.

Of course, you can always compile the package yourself if the "developers" of the operating system fail to do their job.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants