Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Slowly compilation on RPi3 32bit mode
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Mar 21, 2017 10:51 am    Post subject: Reply with quote

madurani,

The rainbow is a test screen drawn by the raspberry pi. I think its the file bootcode.bin that draws it, since it can be disabled in config.txt.
That it does not go away suggests that something is going wrong before the kernel gets control.

Looking at Sakakis and my booting fdisk -l we both have a partition ID of b.
Code:
 Device     Boot Start      End  Sectors Size Id Type
/dev/sdk1  *     2048 16779263 16777216   8G  b W95 FAT32
/dev/sdk1  *     2048   264191   262144  128M  b W95 FAT32


Yours is a little different
Code:
Device     Boot   Start       End   Sectors  Size Id Type
/dev/sdc1  *       2048    206847    204800  100M  c W95 FAT32 (LBA)


Your partition type is c. Use fdisk to change that to b.
I know that bootcode.bin checks that field but I don't know if both b and c are accepted.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Sun Mar 26, 2017 5:15 pm    Post subject: Reply with quote

Hello All,

Could you please advise me with distcc/crossdev issue. I configured distcc compilation between raspberry/gentoo64(sakaki.img) and laptop(gentoo x86_64). Compilation work fine and quickly, but loot of packages finish with same compilation error:

Code:
/usr/lib/gcc/aarch64-unknown-linux-gnu/5.4.0/../../../../aarch64-unknown-linux-gnu/bin/ld: final link failed: Bad value

on this link on side raspberry is:

Code:
pi64 bin # ls -la /usr/lib/gcc/aarch64-unknown-linux-gnu/5.4.0/../../../../aarch64-unknown-linux-gnu/bin/ld

lrwxrwxrwx 1 root root 51 Mar 26 15:27 /usr/lib/gcc/aarch64-unknown-linux-gnu/5.4.0/../../../../aarch64-unknown-linux-gnu/bin/ld -> /usr/aarch64-unknown-linux-gnu/binutils-bin/2.27/ld


I tried recompile binutils but it wasn't useful.

Marek
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sun Mar 26, 2017 5:57 pm    Post subject: Reply with quote

madurani,

Post the output from gcc-config - l from both tho Pi and the helper(s)
All must have the same versions of gcc selected for the aarch64-unknown-linux-gnu compiler.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Sun Mar 26, 2017 6:00 pm    Post subject: Reply with quote

Raspberry:
Code:
pi64 bin # gcc-config -l
 [1] aarch64-unknown-linux-gnu-5.4.0 *


Laptop:
Code:
argo bin # gcc-config -l
 [1] aarch64-unknown-linux-gnu-4.9.4
 [2] aarch64-unknown-linux-gnu-5.4.0 *

 [3] armv7a-hardfloat-linux-gnueabi-4.9.4 *

 [4] x86_64-pc-linux-gnu-4.8.5
 [5] x86_64-pc-linux-gnu-5.4.0 *
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sun Mar 26, 2017 6:06 pm    Post subject: Reply with quote

madurani,

That looks good.

Do you have a complete build log with the final link failed: Bad value ?
If so, put it onto a pastebin.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Sun Mar 26, 2017 6:24 pm    Post subject: Reply with quote

argo ~ # wgetpaste /var/tmp/build.log
Your paste can be seen here: https://paste.pound-python.org/show/Mh85Kd7kIS1MP6tp9zVG/
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sun Mar 26, 2017 6:40 pm    Post subject: Reply with quote

madurani,

The actual error is a few lines up

Code:
/usr/lib/gcc/aarch64-unknown-linux-gnu/5.4.0/../../../../aarch64-unknown-linux-gnu/bin/ld: .libs/libusb_1_0_la-core.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `stderr@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC


Which linker are you using on the Pi?
Code:
/usr/lib/gcc/aarch64-unknown-linux-gnu/5.4.0/../../../../aarch64-unknown-linux-gnu/bin/ld
will be a symbolic link to the actual linker.
I have seen the gold linker (ld.gold) have problems like that.

-- Edit --

If its a linker problem, the failure will be independent of distcc
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Sun Mar 26, 2017 7:28 pm    Post subject: Reply with quote

Could You somebody advise my, what is needed recompile and with which flags?

Code:
`stderr@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
[/code]
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Mon Mar 27, 2017 6:21 am    Post subject: Reply with quote

Hello All,

I added to make.con in variable CFLAGS flag -fPIC. Now compilation via distcc run fine, but I don't know, which affect have this flag. Can somebody shortly enplane me, what mean mentioned flag(-fPIC) and which affect have it?

Code:
CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe -fPIC"


Marek
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Mon Mar 27, 2017 8:31 am    Post subject: Reply with quote

madurani,

-fPIC tells gcc to generate Position Independent Code.
I thought it was the default in Gentoo for many years.

Its not possible to link a program that has some parts compiled with -fPIC and some without. However, that's not normally
a distcc problem.

Do you get the same problem building you test case (=dev-libs/libusb-1.0.21) on the Pi?

What about with distcc but without pump mode, so all the preprocessing is done on the Pi?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Mon Mar 27, 2017 9:03 am    Post subject: Reply with quote

Hello,

Same problem was on lot of packages, but now I don't remember names this packages, but for example, there were mesa and iperf(but there were more packages). Default is setting pupm mode. I tried compile via distcc without pump mode(used suppres-distcc-pump.conf), but with same result as in pump mode(ld issue). When I compile this package without distcc (used makeopts-j4.conf) so compilation run fine but locally. It was same for all package which had problem with ld link.

With flag PIC run compilation fine. Is there some negative affect with this flag?

Marek


Last edited by madurani on Mon Mar 27, 2017 9:38 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Mon Mar 27, 2017 9:37 am    Post subject: Reply with quote

madurani,

Pump mode allows distcc to distribute the configure phase. I could understand that configure run on different systems might get different CFLAGS.
However, without pump mode, helpers only compile. CFLAGS is passed to the helpers with the compile jobs.

I'm running out of ideas. Lets compare USE flag setting on the Pi and helpers.

What does
Code:
emerge -pv sys-devel/gcc
show on each system?
Hopefully, the USE flags set on are identical.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Mon Mar 27, 2017 9:48 am    Post subject: Reply with quote

Here is configuration of gcc:

Code:
Laptop:
[ebuild   R    ] sys-devel/gcc-5.4.0-r3:5.4.0::gentoo  USE="cxx fortran gcj (multilib) nls nptl openmp sanitize vtv (-altivec) (-awt) -cilk -debug -doc (-fixed-point) -go -graphite (-hardened) (-jit) (-libssp) -mpx -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" 0 KiB

Raspberry:
ebuild   R    ] sys-devel/gcc-5.4.0-r3:5.4.0::gentoo  USE="cxx fortran (multilib) nls nptl openmp (-altivec) (-awt) (-cilk) -debug (-doc) (-fixed-point) -gcj -go (-graphite) (-hardened) (-jit) (-libssp) (-mpx) -nopie -nossp -objc -objc++ -objc-gc (-regression-test) -sanitize -vanilla (-vtv)" 0 KiB


I can see there some difference, but I don't know, what I can turn off/on and where.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Mon Mar 27, 2017 10:11 am    Post subject: Reply with quote

madurani,

I asked the right question but it was not complete. Your post shows the native compiles on both systems.
We need the build for the cross compiler on the laptop and the native compiler on the Pi

No the laptop, we need to know about
Code:
emerge -pv cross-aarch64-unknown-linux-gnu/gcc

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Mon Mar 27, 2017 10:20 am    Post subject: Reply with quote

Code:
Laqptop:
[code][ebuild   R    ] cross-aarch64-unknown-linux-gnu/gcc-5.4.0-r3:5.4.0::crossdev  USE="cxx fortran nls nptl openmp vtv (-altivec) -awt -cilk -debug -doc (-fixed-point) -gcj -go -graphite -hardened -jit -libssp -mpx -multilib -nopie -nossp -objc -objc++ -objc-gc -regression-test -sanitize -vanilla" 0 KiB[/code]

Raspberry:
ebuild   R    ] sys-devel/gcc-5.4.0-r3:5.4.0::gentoo  USE="cxx fortran (multilib) nls nptl openmp (-altivec) (-awt) (-cilk) -debug (-doc) (-fixed-point) -gcj -go (-graphite) (-hardened) (-jit) (-libssp) (-mpx) -nopie -nossp -objc -objc++ -objc-gc (-regression-test) -sanitize -vanilla (-vtv)" 0 KiB

Can I set on laptop same use flags as on raspberry and rebuild cross-aarch64-unknown-linux-gnu/gcc?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Mon Mar 27, 2017 2:13 pm    Post subject: Reply with quote

madurani,

You can try that but I don't know what vtv does.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue Mar 28, 2017 1:13 am    Post subject: Reply with quote

vtv controls the gcc feature "vtable verify", which is intended to protect C++ virtual function calls from exploitation. I doubt it will matter here.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Tue Apr 04, 2017 8:02 pm    Post subject: Reply with quote

Hello All,

I want switch audio output(on RPi3) to bluetooth device, but finish with error. Configuration of bluetooth device look OK. Device is paired and connected, but alsa mixer don't know switch to bluealsa devce.

Code:
pi64 ~ # alsamixer -D bluealsa
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.3/work/alsa-lib-1.1.3/src/dlmisc.c:142:(snd_dlsym_verify) unable to verify version for symbol _snd_ctl_bluealsa_open
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.3/work/alsa-lib-1.1.3/src/dlmisc.c:263:(snd1_dlobj_cache_get) symbol _snd_ctl_bluealsa_open is not defined inside /usr/lib64/alsa-lib/libasound_module_ctl_bluealsa.so
cannot open mixer: No such device or address

pi64 ~ # bluetoothctl
[NEW] Controller B8:27:EB:2D:BA:05 BlueZ 5.43 [default]
[NEW] Device 58:51:00:50:A0:B2 AJ-69
[AJ-69]# devices
Device 58:51:00:50:A0:B2 AJ-69
[AJ-69]# info 58:51:00:50:A0:B2
Device 58:51:00:50:A0:B2
        Name: AJ-69
        Alias: AJ-69
        Class: 0x240404
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Apr 04, 2017 9:04 pm    Post subject: Reply with quote

madurani,

I have a /home/<me>/bluealsa.asoundrc
Code:
defaults.bluealsa.interface "hci0"
defaults.bluealsa.device "A0:E9:DB:00:AC:FA"
defaults.bluealsa.profile "a2dp"

## To redirect ALL output to the headset
pcm.!default {
        type bluealsa
#       device A0:E9:DB:00:AC:FA
        profile "auto"
}

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Wed Apr 05, 2017 3:50 pm    Post subject: Reply with quote

Hello All,

I don't know, what happened, but command hciconfig today missing.
I recompiled package as net-wireless/bluez-5.44 and media-sound/bluez-alsa-9999.
Daemons bluetooth is OK, but bluealsa is crashed. Yesterday hciconfig command was reachable and work fine with controller, today not exist.

Code:
pi64 ~ # /etc/init.d/bluetooth status
 * status: started

pi64 ~ # /etc/init.d/bluealsa status
 * status: crashed


bluetoothctl don't show any controler:

Code:
bluetooth]# list
[bluetooth]#
Back to top
View user's profile Send private message
madurani
n00b
n00b


Joined: 08 Mar 2017
Posts: 50

PostPosted: Thu Apr 06, 2017 11:22 am    Post subject: Reply with quote

Hello All,

Problem with missing hciconfig command I fixed, with downgrading of net-wireless/bluez-5.44 to older version, but problem with alsamixer persist.
Still is problem with alsa-lib. I tried it downgrade too, but result is same(below). I don't understand why ALSA lib goes to /var/tmp path. It should be only temporary things created during emerging of package. Have a somebody idea, what can mean an error message below?

Code:
pi64 ~ # alsamixer -D bluealsa
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.3/work/alsa-lib-1.1.3/src/dlmisc.c:142:(snd_dlsym_verify) unable to verify version for symbol _snd_ctl_bluealsa_open
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.1.3/work/alsa-lib-1.1.3/src/dlmisc.c:263:(snd1_dlobj_cache_get) symbol _snd_ctl_bluealsa_open is not defined inside /usr/lib64/alsa-lib/libasound_module_ctl_bluealsa.so
cannot open mixer: No such device or address


I found this workarounds, but I don't understand what I can do:
https://github.com/sabotage-linux/sabotage/issues/285

possible workarounds:

use DEBUGBUILD=1 butch rebuild alsa-lib
hardcode CFLAGS used
fix the alsa code to not do the stupid symbol version checks when --disable-versioning was passed
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1144
Location: Romania

PostPosted: Mon May 08, 2017 9:29 am    Post subject: Reply with quote

if you install a new version of gcc, you should always also recompile distcc to take notice of that new version of gcc and make the links to the new version. both on server and client.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue May 09, 2017 1:08 am    Post subject: Reply with quote

This is the first I have ever seen of that bit of advice. I do not see anything in the distcc ebuild that would seem to support that advice. Could you describe why you believe this to be necessary?
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1144
Location: Romania

PostPosted: Tue May 09, 2017 6:18 am    Post subject: Reply with quote

ls -al /usr/lib/distcc/bin/

I don't think the ebuild does those. I think it may be the distcc makefile.

Anyway. Consider this scenario. You have gcc 5.4.0 installed and distcc on the server (x86_64). You install gcc 6.3.0 as well. Distcc will not be able to use gcc-6 unless you recompile it to take notice of the new gcc-6.

Same thing goes if you install a new crossdev gcc. I guess you could make those things by hand, but why would you? Distcc is short to compile.

EDIT: I guess you don't have to do it on the client (PI).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue May 09, 2017 11:53 am    Post subject: Reply with quote

axl,

distcc picks up which version of gcc to use from the environment at run time.
Thats true if its invoked manually with a wrapper or with FEATURES=distcc.

On the helpers, the version(s) of gcc selected with gcc-config are used, so its important ts set the gcc versison ts be the same everywhere.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum