Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build script not working on fedora #113

Closed
jsmailes opened this issue Sep 2, 2020 · 15 comments
Closed

Build script not working on fedora #113

jsmailes opened this issue Sep 2, 2020 · 15 comments
Assignees
Milestone

Comments

@jsmailes
Copy link

jsmailes commented Sep 2, 2020

Fedora has slightly different package names for its dependencies (libzip-devel, boost-devel, qt-devel) and a different name for the qmake executable (qmake-qt4). I think both of these problems could be fixed by switching from install scripts and Makefiles to a cmake-based build/installation pipeline, allowing the local machine to handle distribution-specific quirks.

I'm also getting the following error when attempting to run the airspaceconverter or airspaceconverter-gui executable:

./airspaceconverter: error while loading shared libraries: libairspaceconverter.so: cannot open shared object file: No such file or directory
I think this is likely another issue with the build script, but I've yet to figure out where the problem lies.

@efa
Copy link
Collaborator

efa commented Sep 3, 2020

OK, we need a tester on Fedora.
Does not exist an executable 'qmake' and neither a link to it?
On my system is so:
$ file /usr/bin/qmake
/usr/bin/qmake: symbolic link to qtchooser
$ which qtchooser
/usr/bin/qtchooser

We can easily modify the script to handle the Fedora distribution, while switching to cmake based build/installation can be little harder. Maybe we can add it in parallel and evaluate how it work.

About the linker error i had to check a thing: I saw it look for the .so only in the current directory and not in executable relative path. Try to run the executable from the directory where are them (executable and shared object)

@efa
Copy link
Collaborator

efa commented Sep 3, 2020

do you have the files:
/etc/os-release
/etc/lsb-release
/etc/redhat-release
if so, can you please post the content here

Same fot the output of:
$ lsb_release -si
$ lsb_release -sr
$ uname -s
$ uname -r

@jsmailes
Copy link
Author

jsmailes commented Sep 7, 2020

I don't have qmake on my system (which qmake returns no result) but I do have qmake-qt4:

$ which qmake-qt4
/usr/bin/qmake-qt4

I don't have any executable on $PATH called qtchooser.

$ cat /etc/os-release
NAME=Fedora
VERSION="31 (Thirty One)"
ID=fedora
VERSION_ID=31
VERSION_CODENAME=""
PLATFORM_ID="platform:f31"
PRETTY_NAME="Fedora 31 (Thirty One)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:31"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=31
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=31
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
$ cat /etc/redhat-release
Fedora release 31 (Thirty One)
$ lsb_release -si
Fedora
$ lsb_release -sr
31
$ uname -s
Linux
$ uname -r
5.6.11-200.fc31.x86_64

Hope this helps, let me know if there's anything else I can do! I'm happy to test builds on my machine.

@efa
Copy link
Collaborator

efa commented Sep 9, 2020

At first I want to support RedHat/Fedora fixing the script 'build.sh', ongoing.

Then I want to add support for RPM generation with a script like 'debianize.sh' (here we need your help as I do not know RPM generation rules), or generating cross-distro package like AppImage:
#117

@jsmailes
Copy link
Author

jsmailes commented Sep 9, 2020

Fixing build.sh to support a wider variety of systems would certainly be a good thing, although I think if you're planning to deploy on multiple distros or operating systems then it might be worth changing up your build system. CMake has an extension called CPack which abstracts away the process of building packages for different operating systems, it might be worth looking into that in order to generate .rpm, .deb etc from the same configuration file.

Here are some potentially useful docs I found on using CPack as part of a CMakeLists.txt:

@efa
Copy link
Collaborator

efa commented Sep 9, 2020

thank you for docs links, we will evaluate adding Cmake build chain.

Can you please test the RedHat branch of my forked repo:
https://github.com/efa/AirspaceConverter/tree/RedHat
it has a simple patch in 'build.sh' for supporting Fedora with qmake-qt4
I understood make of CLI and SO work, and it is the QT build that fail, so the fix is on that.
Please report any error you get

@efa
Copy link
Collaborator

efa commented Sep 9, 2020

about error:
./airspaceconverter: error while loading shared libraries
try my fork branch (waiting integration in main repo):
https://github.com/efa/AirspaceConverter/tree/RPATH
tracked in:
#119

@efa
Copy link
Collaborator

efa commented Sep 15, 2020

RPATH branch is now merged to upstream, try to download the sources, and build with the script:
https://github.com/efa/AirspaceConverter/blob/RedHat/build.sh
report any error here.
If binary are produced, executables should find .so in its directory

@efa
Copy link
Collaborator

efa commented Sep 22, 2020

now also 'build.sh' is merged with upstream.
Try to download the current master sources, and build them

@alus-
Copy link
Member

alus- commented Sep 24, 2020

It would be nice to know if now we can close this issue...

@alus- alus- added this to the 0.3.7 milestone Sep 24, 2020
@efa
Copy link
Collaborator

efa commented Sep 27, 2020

for cmake I created a dedicated issue:
#128

@jsmailes
Copy link
Author

Apologies for the delay in getting back on this, thanks for looking into sorting it out.

I've pulled the latest code from master branch and build.sh now runs without any error, but get the same "error while loading shared libraries" message when I try to run it.

I managed to fix this error by copying Release/libairspaceconverter.so to /usr/lib and running ldconfig to reload shared libraries. This seems to be done by make install or install.sh, but it might be good to try to put together a build path that allows this tool to be used without root.

@jsmailes
Copy link
Author

I just discovered putting Release/libairspaceconverter.so in the buildQt directory allows the binary to run without any installation - consider copying the shared library there during the build process?

@efa
Copy link
Collaborator

efa commented Sep 28, 2020

OK, thank you for test.
good build.sh now work, so generation on Fedora is OK.

Please continue discussion about the .so error in the dedicated issue:
#119
maybe we can close this issue

@alus-
Copy link
Member

alus- commented Oct 3, 2020

Let's close this one if other improvements are required for Fedora we will open new issue(s) for the next releases.

@alus- alus- closed this as completed Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants