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 6: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 1:21 pm, edited 1 time in total.
mifi
 
Posts: 310
Joined: Mon Jul 23, 2007 3:24 pm
Location: NL
Version: git next
OS: Ubuntu 16.04.x Gnome

Re: Linking error: -lQt5::Svg

Postby wkitty42 » Thu Jul 05, 2018 1: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: 5032
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Linking error: -lQt5::Svg

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

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

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

Postby wkitty42 » Thu Jul 05, 2018 1: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: 5032
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

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

Postby abassign » Thu Jul 05, 2018 5: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.
abassign
 
Posts: 761
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

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

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

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

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

Postby cgdae » Sat Sep 22, 2018 4: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: 14
Joined: Tue May 31, 2016 7:35 pm

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

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

Thanks it helped me too!

Regards
KUbuntu 18.04
AMD Phenom(tm) II X4 955 3200 GHz
AMD Radeon HD 5770 Series
22" + 22"
12 Go
F_D2760
 
Posts: 68
Joined: Thu May 09, 2013 12:27 pm
Location: France
Callsign: F_D2760
Version: Last one
OS: KUbuntu 17.10


Return to Compiling

Who is online

Users browsing this forum: No registered users and 2 guests