-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Thanks for reporting this.

On Thu, Nov 24, 2016 at 01:51:58PM +0000, Iain Lane wrote:
> It's wrong - libraries should come after the objects that reference
> them.

Yes, it looks like it is wrong.  However, with the current build system this
cannot be done right.  Linker flags should be in front, libraries should be in
the back.  The names for the variables are normally LDFLAGS and LIBADD;
openmsx-catapult's build system however does not support a LIBADD variable.

It looks like I didn't enable a verbose build, so I can't see the commandline
that it produces on the buildd.  In a local build, by removing the @ sign in
front of the linker line, I see it does:

g++ -Wl,-z,relro -L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_xrc-3.0 
-lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 
-lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0  -lxml2  -s -o 
derived/x86_64-linux-opt/bin/catapult 
derived/x86_64-linux-opt/obj/CatapultPage.o 
derived/x86_64-linux-opt/obj/wxCatapultApp.o 
derived/x86_64-linux-opt/obj/wxCatapultFrm.o 
derived/x86_64-linux-opt/obj/CatapultConfigDlg.o 
derived/x86_64-linux-opt/obj/ConfigurationData.o 
derived/x86_64-linux-opt/obj/PipeReadThread.o 
derived/x86_64-linux-opt/obj/CatapultXMLParser.o 
derived/x86_64-linux-opt/obj/SessionPage.o 
derived/x86_64-linux-opt/obj/InputPage.o 
derived/x86_64-linux-opt/obj/StatusPage.o 
derived/x86_64-linux-opt/obj/VideoControlPage.o 
derived/x86_64-linux-opt/obj/AudioControlPage.o 
derived/x86_64-linux-opt/obj/MiscControlPage.o 
derived/x86_64-linux-opt/obj/openMSXController.o 
derived/x86_64-linux-opt/obj/FullScreenDlg.o 
derived/x86_64-linux-opt/obj/ScreenShotDlg.o 
derived/x86_64-linux-opt/obj/Version.o 
derived/x86_64-linux-opt/obj/RomTypeDlg.o 
derived/x86_64-linux-opt/obj/IPSSelectionDlg.o 
derived/x86_64-linux-opt/obj/AboutDlg.o 
derived/x86_64-linux-opt/obj/CheckConfigsDlg.o 
derived/x86_64-linux-opt/obj/utils.o

So indeed, it contains not only flags, but also libraries.  I suppose Ubuntu's
compiler is set up with -Wl,--as-needed ; that would cause the order to be a
problem.  Using that flag is a good idea, so I think this should be fixed.

I'll contact upstream about it.  (Actually, I think they monitor this bug
tracker, but I'll talk to them anyway.)

Thanks,
Bas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJYNxfbAAoJEJzRfVgHwHE6nKgQAJ2CAd/c5bhY9/wXUWOtTyt+
bWIbkJNBwW4MygAvLTfXMe4RFByQYM4NLn8xoeOfhr76p7Txp+rBumu8aifEnf+H
SzE7XUYXQUuCreQWjasG3JwsP69mErEYEdLqrSvHmBuhfJEWs/MjeqMmHDqU46Qo
BDXyPeRekPRjFr+oxd9KlX0RWmvT5/OxnKS83pjUjPxzTAQSS2r4SOcairEKIKRs
dCKrArxPzqTXRUHKon9VYt+QjqxNiV1V6VQXEXbu7T35J2jF8pAMBRvihJHe0Dh1
5HeCZKUDsUErrsK75DBUBm9cKlB17akbG0mByflxwUt+jRu7oUhqTcI0nQqdQgyo
QnqHr5vb2CFuABDsJXE3DblqlmxwLhM4Vq/WL4bTmG0pNzBZ8mMIfqnDhjjrbMaw
MPL/1aQEpQSrN696hFlTSXzYnW7kPHgGFgVS3Bk2BnbFCSO9ETJjpZw5EWuHUcts
zw+BgtnTsTNDjLeRF8iRKHJE4z+WVBEofhg9XrQw70g6efQiYCH5Ey1EJefY8APi
5xfHxgTMts8agBPr3cqLFpuXW3RL+uq1JKKtVeIRXsUBBJ3+fee1kV7/BblWAnFH
6gesqYUSR1+/KRCi9VFk9DKDFWqqTZyBvwaK8QONvho1le+iN9i35z4AcGYoojvS
wY1TIJCJKTjeDNAv/Ebl
=q9cv
-----END PGP SIGNATURE-----

Reply via email to