![]() |
gcc >= 6 ?
Hi :)
I need gcc >= 6 for sailfish os in order to try to port a program to sailfish os. I've searched it but I've not found it, so I've compiled sources with the latest SDK (1707), but: Code:
/opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: /home/src1/gcc-6.4.0/host-armv7l-unknown-linux-gnueabihf/gcc/liblto_plugin.so: error loading plugin: re/locale-langpack/en_US/LC_MESSAGES/armv7hl-meego-linux-gnueabi-ld.mo Code:
/opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: /home/src1/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/liblto_plugin.so: error loading plugin: /locale/en_US/LC_MESSAGES/armv7hl-meego-linux-gnueabi-ld.mo Then I've tried to compiled it on jolla1, but after 30 hours: Code:
libtool: link: (cd ".libs" && rm -f "libgcj_bc.so.1" && ln -s "libgcj_bc.so.1.0.0" "libgcj_bc.so.1") Any suggestions? Thanks EDIT: for your information, compilation of version 7.1 has failed. Code:
libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a |
Re: gcc >= 6 ?
Quote:
|
Re: gcc >= 6 ?
Probably configure options that are not good.
Take a look at a success for 5.10 here https://talk.maemo.org/showthread.php?p=1478195 |
Re: gcc >= 6 ?
I asked about upgrading GCC during the last community meeting and the answer was:
For reference, minutes from relevant community meetings: http://merproject.org/meetings/mer-m...-04-14.33.html http://merproject.org/meetings/mer-m...-26-08.02.html tl;dr: Jolla has its own patches, it's unknown whether they're needed at all and are kinda shifting this all onto community (that was my impression, after all). Btw. GCC 4.x is now end of life, even in Linaro ;) |
Re: gcc >= 6 ?
Quote:
Sadly, they want to switch on gcc5 :eek: I'm going to cry... Quote:
I've tried your configure options but on sailfish SDK there are the same errors as before. :( I have to try on mer SDK (see below). For your information, my configure options came from gcc4 spec file. I've downloaded source file on jolla1: Code:
pkcon download . gcc Quote:
but now I'm tired... I think I need holidays! |
Re: gcc >= 6 ?
Quote:
are those patches available somewhere? |
Re: gcc >= 6 ?
Quote:
|
Re: gcc >= 6 ?
Quote:
|
Re: gcc >= 6 ?
For those interested in getting gcc 6x working, I have compiled gcc 6.4.0 at OBS. Its available at https://build.merproject.org/package...oolbox/opt-gcc . Compiler is build with options that should allow, in theory, to mix it with the current compiler on SFOS. Compiler is installed at /opt/gcc6, making it possible to have platform gcc and opt-gcc installed at the same time.
Please note that this compiler is not tested. Its early days... I have seen issues with linking, such as absence of correct libstdc++ and glibc. For simpler programs, that was resolved either by setting LD_LIBRARY_PATH to include /opt/gcc6/lib or linking with /usr/bin/g++ Note that such packaging is not "proper", as done by system packages. It installs whole c & c++ as a one package together with all libs under /opt/gcc6 Finally, as with @yurib, I had issues with getting ARM version compiled with LTO. So, ARM version is compiled with LTO disabled. The error message was (from OBS build log) Code:
[ 4478s] ranlib libgcc_eh.a |
Re: gcc >= 6 ?
Just to let you know - I have been using this compiler to port a rather complicated C++14 project and it seems to work nicely. There current issues are filed at https://github.com/rinigus/pkg-gcc/issues .
We are also missing README and example projects to show how can it be used. All in all, I would suggest to try to use it and everyone is welcome to chip in by fixing the problems with gcc packaging at OBS. |
Re: gcc >= 6 ?
For those interested in an example on how to use gcc 6 for their projects could look into https://github.com/rinigus/mapbox-demo-sfos. Its a working solution that allowed me to port C++14 library and build a simple application around it.
Some notes: * In YAML (https://github.com/rinigus/mapbox-de...pbox-sfos.yaml), add opt-gcc6 as PkgBR * Project file (https://github.com/rinigus/mapbox-de...apbox-sfos.pro) has compilers and linkers defined to /opt/gcc6/bin/g++ . * For C++14, add c++14 in CONFIG of the project file. * In project file, you could either opt for static or shared linking with stdc++. Static linking (as in the current version of pro file, see LIBS var) makes it easier to distribute, may have some side effects. Sometimes, as when developing QML plugin, static is the only way to go. * Desktop file (https://github.com/rinigus/mapbox-de...x-sfos.desktop) has an application switched to "generic" to avoid silica boosters getting confused with the wrong stdc++ library version (dynamic link to stdc++) or inability to send signals (static link to stdc++). * If you went for shared stdc++ build, add Code:
%define __provides_exclude_from ^%{_datadir}/.*$ Code:
# ship all shared libraries not allowed in Harbour with the app * See https://github.com/rinigus/mapbox-de...sfos-rpmlintrc if you get into trouble with OBS. For me, it all worked and I could compile and distribute program with gcc 6.4.0 as well as QML plugin compiled using similar approach. I believe that this is a viable solution and should allow to port the software that requires recent gcc version. |
Re: gcc >= 6 ?
If you want to use it from within the OBS, see how to add the repo to your project: https://build.merproject.org/project...e:rinigus:maps
|
Re: gcc >= 6 ?
|
Re: gcc >= 6 ?
Quote:
@neochapay, have you tried to compile anything demanding with it? How does libstdc++ versioning go? In particular, I expect to have the same problems as with opt-gcc6 packaging - either * libstdc++ has to be updated on device * provided with an app * linked statically Note that SFOS boosters may not like your app-provided dynamically linked libstdc++ Looking forward to use it. Thank you again! |
Re: gcc >= 6 ?
Quote:
|
Re: gcc >= 6 ?
Quote:
|
Re: gcc >= 6 ?
Quote:
|
Re: gcc >= 6 ?
Quote:
|
All times are GMT. The time now is 05:44. |
vBulletin® Version 3.8.8