-
Notifications
You must be signed in to change notification settings - Fork 443
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
Fix LDFLAGS for cross-compilation #1798
Conversation
@ffontaine Could you please fix this? Thanks |
@ChristianBeer, Than you
Best regards,
Vitalii
|
@ffontaine How are you cross-compiling? Can you give some commands that I can try locally? |
I'm cross-compiling using buildroot (https://buildroot.org).
|
boinc patch for buildroot is here: https://patchwork.ozlabs.org/patch/735295/. |
Remove "-L$(libdir) -rapth $(libdr)" from LDFLAGS of boinc libraries in Makefile.am of api, lib, sched and zlib directories to be able to cross-compile boinc. Indeed, libdir is not equal to the path where BOINC will be installed but to exec_prefix/lib. The full installation path is $(DESTDIR)/$(libdir). To cross-compile boinc, exec_prefix will be set to the target path (for example: /usr) and DESTDIR will be set (during make install) to the staging or target directory on the host (for example /home/xxx/target). The issue of adding -L$(libdir) is that it is not allowed by the compiler, the error "unsafe header/library path used in cross-compilation: '-L/usr/lib'" will be raised. As a result, remove "-L$(libdir) -rapth $(libdr)" from LDFLAGS, the default library search paths are sufficient for "standard" compilation or can be updated manually by passing the additional search path to LDFLAGS during the configure call for cross-compilation. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
I updated the patch to also remove "-rpath $(libdir)" following the review of my buildroot patch by Thomas. |
From the patch discussion:
@ffontaine your assumption is wrong. The vboxwrapper tags are only for the vboxwrapper tool located in samples/vboxwrapper. It has little to do with how BOINC is installed and vboxwrapper is an application that is used by projects to run scientific applications inside virtual box containers. If you want to grab client/manager releases the tag format is
Back to topic: I couldn't find a definitive reason why Regarding the license in COPYING: this should be cleared up shortly as I think this was a copy and paste error. |
Thanks for this clarification, I will update my patch accordingly. However, how can I know what is the latest version of client_release? 7.4.52 is the latest client_release version referenced in https://github.com/BOINC/boinc/releases. Should I check https://boinc.berkeley.edu/download_all.php? |
@ffontaine You can find all relevent verions here: http://boinc.berkeley.edu/download_all.php?xml=1 |
Regarding the license issue in case you are not following boinc_dev this is what @nicolas17 found out:
|
Thanks for your contribution. |
Remove "-L$(libdir)" from LDFLAGS of boinc libraries in Makefile.am of
api, lib, sched and zlib directories to be able to cross-compile boinc.
Indeed, libdir is not equal to the path where BOINC will be installed
$(DESTDIR)/$ (libdir).
but to exec_prefix/lib. The full installation path is
To cross-compile boinc, exec_prefix will be set to the target path (for
example: /usr) and DESTDIR will be set (during make install) to the
staging or target directory on the host (for example /home/xxx/target).
The issue of adding -L$(libdir) is that it is not allowed by the
compiler, the error "unsafe header/library path used in
cross-compilation: '-L/usr/lib'" will be raised.
As a result, remove -L$(libdir)" from LDFLAGS, the default library
search paths are sufficient for "standard" compilation or can be updated
manually by passing the additional search path to LDFLAGS during the
configure call for cross-compilation.
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com