Active Topics

 


Reply
Thread Tools
Posts: 4 | Thanked: 3 times | Joined on Aug 2017
#1
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
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/home/src1/gcc-6.4.0/armv7l-unknown-linux-gnueabihf/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/src1/gcc-6.4.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/src1/gcc-6.4.0'
make: *** [all] Error 2
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
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/home/src1/gcc-7.1.0/armv7l-unknown-linux-gnueabihf/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/src1/gcc-7.1.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/src1/gcc-7.1.0'
make: *** [all] Error 2

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")
libtool: link: (cd ".libs" && rm -f "libgcj_bc.so" && ln -s "libgcj_bc.so.1.0.0" "libgcj_bc.so")
libtool: link: ( cd ".libs" && rm -f "libgcj_bc.la" && ln -s "../libgcj_bc.la" "libgcj_bc.la" )
/dev/null:1:3: error: invalid preprocessing directive ###
 # ### BEGIN LIBTOOL TAG CONFIG: CXX
   ^~
make[3]: *** [libgcj_bc.la] Error 1
make[3]: Leaving directory `/home/nemo/gcc-6.4.0/armv7l-unknown-linux-gnueabihf/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/nemo/gcc-6.4.0/armv7l-unknown-linux-gnueabihf/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/nemo/gcc-6.4.0'
make: *** [all] Error 2
(compilation of version 7.1 has begun 10 minutes ago, but I think it'll fail)

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
(echo "@set version-GCC 7.1.0"; \
         if [ "" = "experimental" ]; \
         then echo "@set DEVELOPMENT"; \
         else echo "@clear DEVELOPMENT"; \
         fi) > gcc-vers.texiT
echo @set srcdir /home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/../.././gcc >> gcc-vers.texiT
if [ -n "(GCC) " ]; then \
          echo "@set VERSION_PACKAGE (GCC) " >> gcc-vers.texiT; \
        fi
echo "@set BUGURL @uref{https://gcc.gnu.org/bugs/}" >> gcc-vers.texiT; \
        mv -f gcc-vers.texiT gcc-vers.texi
echo timestamp > gcc.pod
perl ../.././gcc/../contrib/texi2pod.pl ../.././gcc/doc/invoke.texi > gcc.pod
echo timestamp > doc/gcc.1
(pod2man --center="GNU" --release="gcc-7.1.0" --date=2017-05-02 --section=1 gcc.pod > doc/gcc.1.T$$ && \
                mv -f doc/gcc.1.T$$ doc/gcc.1) || \
                (rm -f doc/gcc.1.T$$ && exit 1)
cp doc/gcc.1 doc/g++.1
perl ../.././gcc/../contrib/texi2pod.pl -DBUGURL="@uref{https://gcc.gnu.org/bugs/}" \
          < ../.././gcc/fortran/invoke.texi > gfortran.pod
echo timestamp > doc/gfortran.1
(pod2man --center="GNU" --release="gcc-7.1.0" --date=2017-05-02 --section=1 gfortran.pod > doc/gfortran.1.T$$ && \
                mv -f doc/gfortran.1.T$$ doc/gfortran.1) || \
                (rm -f doc/gfortran.1.T$$ && exit 1)
/home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/xgcc -B/home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/ -nostdinc -x c /dev/null -S -o /dev/null -fself-test=../.././gcc/testsuite/selftests
/dev/null:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
cc1: note: self-tests are not enabled in this build
make[3]: *** [s-selftest] Error 1
rm gfortran.pod gcc.pod
make[3]: Leaving directory `/home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/nemo/gcc-7.1.0'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/nemo/gcc-7.1.0'
make: *** [all] Error 2

Last edited by yurib; 2017-08-14 at 21:09.
 

The Following 3 Users Say Thank You to yurib For This Useful Post:
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#2
Originally Posted by yurib View Post
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
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/home/src1/gcc-6.4.0/armv7l-unknown-linux-gnueabihf/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/src1/gcc-6.4.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/src1/gcc-6.4.0'
make: *** [all] Error 2
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
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/home/src1/gcc-7.1.0/armv7l-unknown-linux-gnueabihf/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/src1/gcc-7.1.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/src1/gcc-7.1.0'
make: *** [all] Error 2

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")
libtool: link: (cd ".libs" && rm -f "libgcj_bc.so" && ln -s "libgcj_bc.so.1.0.0" "libgcj_bc.so")
libtool: link: ( cd ".libs" && rm -f "libgcj_bc.la" && ln -s "../libgcj_bc.la" "libgcj_bc.la" )
/dev/null:1:3: error: invalid preprocessing directive ###
 # ### BEGIN LIBTOOL TAG CONFIG: CXX
   ^~
make[3]: *** [libgcj_bc.la] Error 1
make[3]: Leaving directory `/home/nemo/gcc-6.4.0/armv7l-unknown-linux-gnueabihf/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/nemo/gcc-6.4.0/armv7l-unknown-linux-gnueabihf/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/nemo/gcc-6.4.0'
make: *** [all] Error 2
(compilation of version 7.1 has begun 10 minutes ago, but I think it'll fail)

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
(echo "@set version-GCC 7.1.0"; \
         if [ "" = "experimental" ]; \
         then echo "@set DEVELOPMENT"; \
         else echo "@clear DEVELOPMENT"; \
         fi) > gcc-vers.texiT
echo @set srcdir /home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/../.././gcc >> gcc-vers.texiT
if [ -n "(GCC) " ]; then \
          echo "@set VERSION_PACKAGE (GCC) " >> gcc-vers.texiT; \
        fi
echo "@set BUGURL @uref{https://gcc.gnu.org/bugs/}" >> gcc-vers.texiT; \
        mv -f gcc-vers.texiT gcc-vers.texi
echo timestamp > gcc.pod
perl ../.././gcc/../contrib/texi2pod.pl ../.././gcc/doc/invoke.texi > gcc.pod
echo timestamp > doc/gcc.1
(pod2man --center="GNU" --release="gcc-7.1.0" --date=2017-05-02 --section=1 gcc.pod > doc/gcc.1.T$$ && \
                mv -f doc/gcc.1.T$$ doc/gcc.1) || \
                (rm -f doc/gcc.1.T$$ && exit 1)
cp doc/gcc.1 doc/g++.1
perl ../.././gcc/../contrib/texi2pod.pl -DBUGURL="@uref{https://gcc.gnu.org/bugs/}" \
          < ../.././gcc/fortran/invoke.texi > gfortran.pod
echo timestamp > doc/gfortran.1
(pod2man --center="GNU" --release="gcc-7.1.0" --date=2017-05-02 --section=1 gfortran.pod > doc/gfortran.1.T$$ && \
                mv -f doc/gfortran.1.T$$ doc/gfortran.1) || \
                (rm -f doc/gfortran.1.T$$ && exit 1)
/home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/xgcc -B/home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc/ -nostdinc -x c /dev/null -S -o /dev/null -fself-test=../.././gcc/testsuite/selftests
/dev/null:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
cc1: note: self-tests are not enabled in this build
make[3]: *** [s-selftest] Error 1
rm gfortran.pod gcc.pod
make[3]: Leaving directory `/home/nemo/gcc-7.1.0/host-armv7l-unknown-linux-gnueabihf/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/nemo/gcc-7.1.0'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/nemo/gcc-7.1.0'
make: *** [all] Error 2
On Jolla1? Please use the MER platform SDK instead! It'll make your life alot easier.
__________________
BWizz - best N9 bookmark editing tool! Check it out ->BWizz for Harmattan

LINKer - transform your N9's home view in a Desktop, give it the freedom it deserves! -> LINKer for Harmattan

QuickBar - Can't find the app you used yesterday in your overcrowded Home Screen? Want access to the QuickLaunch bar even in the home screen? QuickBar for Harmattan

If you like our work, and would like to support via PayPal : users.giulietta@gmail.com
 

The Following 4 Users Say Thank You to tortoisedoc For This Useful Post:
Posts: 1,293 | Thanked: 4,319 times | Joined on Oct 2014
#3
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
 

The Following 2 Users Say Thank You to nieldk For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#4
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
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following 2 Users Say Thank You to marmistrz For This Useful Post:
Posts: 4 | Thanked: 3 times | Joined on Aug 2017
#5
Originally Posted by marmistrz View Post
I asked about upgrading GCC during the last community meeting and the answer was:
Many thanks!

Sadly, they want to switch on gcc5 I'm going to cry...




Originally Posted by nieldk View Post
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
Thanks
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
then I've looked in it.




Originally Posted by tortoisedoc View Post
On Jolla1? Please use the MER platform SDK instead! It'll make your life alot easier.
Thanks
but now I'm tired... I think I need holidays!
 
Posts: 592 | Thanked: 1,167 times | Joined on Jul 2012
#6
Originally Posted by marmistrz View Post
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

are those patches available somewhere?
__________________
BWizz - best N9 bookmark editing tool! Check it out ->BWizz for Harmattan

LINKer - transform your N9's home view in a Desktop, give it the freedom it deserves! -> LINKer for Harmattan

QuickBar - Can't find the app you used yesterday in your overcrowded Home Screen? Want access to the QuickLaunch bar even in the home screen? QuickBar for Harmattan

If you like our work, and would like to support via PayPal : users.giulietta@gmail.com
 

The Following 3 Users Say Thank You to tortoisedoc For This Useful Post:
Posts: 4 | Thanked: 3 times | Joined on Aug 2017
#7
Originally Posted by tortoisedoc View Post
are those patches available somewhere?
According to the chat log, here they are.
 
Posts: 4 | Thanked: 3 times | Joined on Aug 2017
#8
Originally Posted by nieldk View Post
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
On Sailfish SDK, compilation has always failed, I've tried with every version of gcc.

Last edited by yurib; 2017-10-04 at 19:10.
 
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#9
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
[ 4478s] # @multilib_dir@ is not really necessary, but sometimes it has
[ 4478s] # more uses than just a directory name.
[ 4478s] /bin/sh /home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj/../libgcc/../mkinstalldirs .
[ 4478s] /home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj/./gcc/xgcc -B/home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj/./gcc/ 
... unordsf2_s.o fixsfsi_s.o floatsisf_s.o floatunsisf_s.o adddf3_s.o divdf3_s.o eqdf2_s.o gedf2_s.o ledf2_s.o muldf3_s.o negdf2_s.o subdf3_s.o unorddf2_s.o fixdfsi_s.o floatsidf_s.o floatunsidf_s.o extendsfdf2_s.o truncdfsf2_s.o enable-execute-stack_s.o unwind-arm_s.o libunwind_s.o pr-support_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && (echo "/* GNU ld script"; echo "   Use the shared library, but some functions are only in"; echo "   the static library.  */"; echo "GROUP ( libgcc_s.so.1 -lgcc )" ) > ./libgcc_s.so
[ 4479s] /opt/cross/bin/armv7hl-meego-linux-gnueabi-ld: /home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj/./gcc/liblto_plugin.so: error loading plugin: PTmPTm
[ 4479s] collect2: error: ld returned 1 exit status
[ 4479s] make[3]: *** [libgcc_s.so] Error 1
[ 4479s] make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj/armv7l-unknown-linux-gnueabihf/libgcc'
[ 4479s] make[2]: *** [all-stage1-target-libgcc] Error 2
[ 4479s] make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj'
[ 4479s] make[1]: *** [stage1-bubble] Error 2
[ 4479s] make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/gcc-6.4.0/obj'
[ 4479s] make: *** [all] Error 2
[ 4479s] error: Bad exit status from /var/tmp/rpm-tmp.jFkB2P (%build)
[ 4479s] 
[ 4479s] 
[ 4479s] RPM build errors:
[ 4479s]     Bad exit status from /var/tmp/rpm-tmp.jFkB2P (%build)
[ 4482s] [ 4465.323263] SysRq : Power Off
[ 4482s] [ 4465.327031] reboot: Power down
So, there is surely room for improvement
 

The Following 8 Users Say Thank You to rinigus For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#10
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.
 

The Following 7 Users Say Thank You to rinigus For This Useful Post:
Reply

Tags
gcc 6, sailfish os


 
Forum Jump


All times are GMT. The time now is 18:37.