vranki / ExtPlane

Plugin for X-Plane flight simulator which allows reading and writing simulation properties
138 stars 44 forks source link

Latest builds do not include Windows plugin #41

Closed waynepiekarski closed 5 years ago

waynepiekarski commented 5 years ago

I was looking at the latest release builds available, and it seems like they include lin.xpl but not win.xpl ... is there a problem with the build server?

agarzon commented 5 years ago

I noticed the same :(

vranki commented 5 years ago

Cross compilation fails due to very cryptic compile issue:

../extplane-server/libextplane-server.a(moc_tcpclient.o):moc_tcpclient.cpp:(.data$_ZZN11QMetaTypeIdIN15QAbstractSocket11SocketErrorEE14qt_metatype_idEvE11metatype_id[_ZZN11QMetaTypeIdIN15QAbstractSocket11SocketErrorEE14qt_metatype_idEvE11metatype_id]+0x0): multiple definition of `QMetaTypeId<QAbstractSocket::SocketError>::qt_metatype_id()::metatype_id'
./moc_basictcpclient.o:(.bss._ZZN11QMetaTypeIdIN15QAbstractSocket11SocketErrorEE14qt_metatype_idEvE11metatype_id[_ZZN11QMetaTypeIdIN15QAbstractSocket11SocketErrorEE14qt_metatype_idEvE11metatype_id]+0x0): first defined here
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/qt5/lib/libQt5Network.a(qabstractsocket.o):qabstractsocket.cpp:(.data$_ZZN11QMetaTypeIdIN15QAbstractSocket11SocketStateEE14qt_metatype_idEvE11metatype_id[_ZZN11QMetaTypeIdIN15QAbstractSocket11SocketStateEE14qt_metatype_idEvE11metatype_id]+0x0): multiple definition of `QMetaTypeId<QAbstractSocket::SocketState>::qt_metatype_id()::metatype_id'
./moc_basictcpclient.o:(.bss._ZZN11QMetaTypeIdIN15QAbstractSocket11SocketStateEE14qt_metatype_idEvE11metatype_id[_ZZN11QMetaTypeIdIN15QAbstractSocket11SocketStateEE14qt_metatype_idEvE11metatype_id]+0x0): first defined here
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-ld: ./dataref.o: invalid relocation type 42
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-ld: BFD (GNU Binutils) 2.25.1 assertion fail elf64-x86-64.c:341
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-ld: ./dataref.o: invalid relocation type 42
/usr/lib/mxe/usr/bin/x86_64-w64-mingw32.static-ld: BFD (GNU Binutils) 2.25.1 assertion fail elf64-x86-64.c:341
Error: 0-bit reloc in dll
Error: 0-bit reloc in dll
waynepiekarski commented 5 years ago

Hmmm, I'm thinking maybe my last commit could have triggered this problem: https://github.com/vranki/ExtPlane/pull/40/commits/5d0e5cc1b17f25076e0af49b125c11c4e676aea8

All the constants are defined in tcpserver.h, and I included them into tcpclient.cpp. There is nothing wrong here, but perhaps it could trigger some kind of weird moc problem. We may need to move all the #define macros for the port and protocol numbers from tcpserver.h into a global header file, and not include tcpserver.h into tcpclient.cpp.

agarzon commented 5 years ago

I wish I could help, but I do not code in c++ :(

waynepiekarski commented 5 years ago

@vranki do you have more context from the log above? I'm curious to know which file it is linking at this time, the plugin or one of the other files.

I think the issue might not be in my code. It could be the change bcdc8b3691 labelled "Build fixes, not tested properly" from 2018-11-14. Under Cygwin and MinGW, I'm getting linking problems when building extplane-plugin.pro because it is now trying to link with extplane-client-qt as well. The change modified extplane-plugin/extplane-plugin.pro to add the client when it was never included before. We probably don't want to do this, and the path used was wrong because it was in a "release" subdirectory. I noticed in the server dir you have a hack DESTDIR = $$PWD and a comment "hope this doesn't break anything" ... perhaps this needs to be done for the dirs?

I also had a few other smaller issues, that stopped me doing more testing on other machines:

  1. QNetworkDatagram doesn't exist in any Qt version that Debian stable has, it is super new.
  2. I had to also apt-get install qtdeclarative5-dev on Linux to get other parts to build, not mentioned in README.

Hope this helps!

vranki commented 5 years ago

Thanks all for help & ideas. I'm busy with other stuff so I probably won't be able to work on this for at least a week or so.

You can try the cross-compilation yourself using script scripts/cross-compile-win64-from-lin.sh (read it first, it assumes mxe and x-plane sdk are installed).

If you want full ci build inside docker, see files .travis.yml and Dockerfile

byjokese commented 5 years ago

any news on this?

vranki commented 5 years ago

I'll try to remember to take a look some day.

More developers needed for the project :-)

vranki commented 5 years ago

Looks like mxe repository has changed. I've now fixed the Dockerfile and there should be a new release soon..

vranki commented 5 years ago

Fixed, thanks for reporting.