Board index FlightGear Support Compiling

[SOLVED] Linking error: -lQt5::Svg

Building FlightGear from source, and in the need for help?

[SOLVED] Linking error: -lQt5::Svg

Postby mifi » Thu Jul 05, 2018 7:41 am

I have been compiling fgfs from source for years now.
Every now and then, there are problems, but they usually get fixed within a couple of days. No worries there.

A couple of days ago something changed that make my build fail with a linking error:
Code: Select all
/usr/bin/x86_64-linux-gnu-ld: cannot find -lQt5::Svg
collect2: error: ld returned 1 exit status


Does anyone else have this bug?

I am on Ubuntu 18.04 using the download_and_compile.sh script. The libqt5svg5 lib is installed.

Code: Select all
/usr/lib/x86_64-linux-gnu/libQt5Svg.so.5
/usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9
/usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9.5


m
Last edited by mifi on Thu Jul 05, 2018 2:21 pm, edited 1 time in total.
mifi
 
Posts: 327
Joined: Mon Jul 23, 2007 4:24 pm
Location: NL
Version: git next
OS: Ubuntu 18.04.x Gnome

Re: Linking error: -lQt5::Svg

Postby wkitty42 » Thu Jul 05, 2018 2:04 pm

did you also install the -dev package for that library?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Linking error: -lQt5::Svg

Postby mifi » Thu Jul 05, 2018 2:20 pm

I had not, but now I have. Fixed.
Thank you.
mifi
 
Posts: 327
Joined: Mon Jul 23, 2007 4:24 pm
Location: NL
Version: git next
OS: Ubuntu 18.04.x Gnome

Re: [SOLVED] Linking error: -lQt5::Svg

Postby wkitty42 » Thu Jul 05, 2018 2:50 pm

yeah, you always have to install the -dev too so you can actually build against it...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: [SOLVED] Linking error: -lQt5::Svg

Postby abassign » Thu Jul 05, 2018 6:21 pm

The solution is to install this package on Ubuntu and derivatives:

Image

At this point I remembered that the problem had already been reported. The solution would be to modify the "download_and_compile.sh" script by adding a line of code (from line 339):

# FG
PKG="$PKG libopenal-dev libudev-dev qt5-default qtdeclarative5-dev libdbus-1-dev libplib-dev"

With this add:

# FG
PKG="$PKG libopenal-dev libudev-dev qt5-default qtdeclarative5-dev libdbus-1-dev libplib-dev libqt5xdg-dev libqt5xdgiconloader-dev"

He immediately worked!

Unfortunately no one has fixed the problem of the script, it would be nice to fix it. I point out that I tried, before knowing the solution, to install FGFS on:

Ubuntu 17.10 and 18.4 and Linux MInt 18.3 and 19.1 !

Note:
Probably the libraries I have used are not the most correct, but they are sufficient, due to the automatic method to satisfy dependencies, to solve the problem. I expect some more experienced programmer to me to find the correct change.
Developer of the program https://wiki.flightgear.org/Julia_photoscenery_generator
FDM developer of the G91R1B aircraft https://wiki.flightgear.org/FIAT_G91R1B
JSBSim collaborator
abassign
 
Posts: 947
Joined: Mon Feb 27, 2012 6:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2020.4
OS: Ubuntu 20.10

Re: [SOLVED] Linking error: -lQt5::Svg

Postby mifi » Thu Jul 05, 2018 6:35 pm

It would be good to add that to download_and_compile.sh, I agree.
mifi
 
Posts: 327
Joined: Mon Jul 23, 2007 4:24 pm
Location: NL
Version: git next
OS: Ubuntu 18.04.x Gnome

Re: [SOLVED] Linking error: -lQt5::Svg

Postby cgdae » Sat Sep 22, 2018 5:30 pm

I've just run download_and_compile.sh with stable on devuan, and i found i had to also add libqt5svg5-dev, i.e. this patch:

Code: Select all
-PKG="$PKG libopenal-dev libudev-dev qt5-default qtdeclarative5-dev libdbus-1-dev libplib-dev"
+PKG="$PKG libopenal-dev libudev-dev qt5-default qtdeclarative5-dev libdbus-1-dev libplib-dev libqt5xdg-dev libqt5xdgiconloader-dev libqt5svg5-dev"
cgdae
 
Posts: 117
Joined: Tue May 31, 2016 8:35 pm

Re: [SOLVED] Linking error: -lQt5::Svg

Postby F_D2760 » Sun Mar 17, 2019 9:20 pm

Thanks it helped me too!

Regards
KUbuntu 22.04
AMD Ryzen 5 5600G
AMD Radeon RX 6650 XT
22" + 22"
16 Go
F_D2760
 
Posts: 84
Joined: Thu May 09, 2013 1:27 pm
Location: Oise - France
Callsign: F_D2760
Version: Last one
OS: KUbuntu 22.04


Return to Compiling

Who is online

Users browsing this forum: No registered users and 2 guests

cron