03-20-2019, 02:20 PM | #16 | ||
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Quote:
Its a great piece of work though but the binaries it produced segfaulted also Live CD also produced segfaulted binaries, so i know its something im missing Quote:
|
||
03-20-2019, 02:41 PM | #17 |
cosiñeiro
Posts: 1,287
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
If you want to build qt applications with koxtoolchain you'll need to link statically against libstdc++, because system is too old for modern toolchains.
Add the following to your pro file (of course edit the path first): Code:
LIBS += /home/pazos/x-tools/arm-kobo-linux-gnueabihf/arm-kobo-linux-gnueabihf/lib/libstdc++.a QMAKE_LFLAGS += -static-libstdc++ Last edited by pazos; 03-20-2019 at 02:50 PM. |
Advert | |
|
03-20-2019, 07:26 PM | #18 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Time to fire up GDB...
(I smell hardfp/softp shenanigans, as Kobo's dynamic loader is slightly finicky on that front). |
03-21-2019, 08:06 AM | #19 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
@NiLuJe
gdb ? you give me way too much credit @pazos Toolchain was from 2013, so i needed the lib32stdc++6 package. Afaict this could have been used by the compiler. So I tried your static linking, (one step forward) the results were slightly different but still no dice Then I removed the lib32stdc++6 package and tried the latest koxtoolchain as its 64-bit Makes no difference, I either end up with a 'segfault' or 'illegal Instruction'. I'm feeling quite hopeless here Last edited by BloodRagg; 03-21-2019 at 08:08 AM. Reason: attached config.log |
03-21-2019, 08:58 AM | #20 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Try attaching a simple hello world you built so we can check how exactly it crashes .
|
Advert | |
|
03-21-2019, 12:12 PM | #21 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Hmm...that compiles and runs just fine.
|
03-21-2019, 05:14 PM | #22 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
What's the actual target device, and on which FW version? And what kind of CFLAGS are you passing?
EDIT: As far as dropbear is concerned, you may also want to *disable* hardening, as that's been broken since since the latest release on my end (with a hang, not a crash, though). Last edited by NiLuJe; 03-21-2019 at 05:18 PM. |
03-26-2019, 02:37 PM | #23 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Found the %$£$@£$£ £4 problem, linker defaulted to build system instead of host/target.
>> LD=arm-linux-gnuabihf << fixed the problem in my case. So I configured all those other variables as well CC GXX AR NM OBJCOPY etc.. etc.. Silly me thought make CROSS_COMPILE=arm-linux-gnuabihf- would be enough. @NiLuJe, how did you compile 2018.76, mine keeps asking for glibc 2.25 which relies on kernel 3.2.0 ? Furthest i came was 2016.72 |
03-26-2019, 02:55 PM | #24 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@BloodRagg: What's asking for glibc 2.25? The configure or the binaries at runtime? Which what TC?
|
03-26-2019, 03:39 PM | #25 | |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Quote:
[root@(none) tmp]# ./sbin/dropbear ./sbin/dropbear: /lib/libc.so.6: version `GLIBC_2.25' not found (required by ./sbin/dropbear) [root@(none) tmp]# TC: gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf PKG: dropbear-2019.77 |
|
03-26-2019, 04:27 PM | #26 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
How was that TC built? koxtoolchain targets glibc-2.15, so it can't pull newer symbols unless you're doing things wrong .
See my earlier mention of disabling hardening, but even if that fixes it, that doesn't mean that your setup isn't seriously broken . Speaking of: exceedingly few things should require you to manually enforce CC, CXX, AR, NM, LD & friends. Very few things actually rely on a CROSS_something env var either (OTOH, busybox and OpenSSL would be two exceptions, each expecting a slightly different env var, with a slightly different syntax, IIRC). What *is* almost ubiquitous, though, is autotool's confusingly named --host argument, which accepts a toolchain triplet, and automatically obeys it to set CC & co. EDIT: As far as 2019.77 is concerned, my best guess is you're picking up your system includes/glibc because of aforementioned mistakes, and as such it's detecting strlcat/strlcpy as available, while they're definitely not . Last edited by NiLuJe; 03-26-2019 at 04:45 PM. |
03-27-2019, 05:48 AM | #27 | |||
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Quote:
Quote:
Quote:
It works when i remove the MULTI=1 though, but i really want it as an multiexec Code:
/tmp/autobuild/gcc-kox-7.4.1-2019.02-1f65f8d-x86_64-arm-kobo-linux-gnueabihf/bin/../lib/gcc/arm-kobo-linux-gnueabihf/7.4.1/../../../../arm-kobo-linux-gnueabihf/bin/ld.bfd: /tmp/autobuild/gcc-kox-7.4.1-2019.02-1f65f8d-x86_64-arm-kobo-linux-gnueabihf/bin/../arm-kobo-linux-gnueabihf/sysroot/usr/lib/Scrt1.o: in function `_start': init.c:(.text+0x4c): undefined reference to `main' collect2: error: ld returned 1 exit status Makefile:192: recipe for target 'dropbear' failed make: *** [dropbear] Error 1 /tmp/autobuild/dropbear-2019.77$ |
|||
03-27-2019, 10:10 AM | #28 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Full configure and build output would be more helpful .
|
03-27-2019, 11:41 AM | #29 |
Zealot
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
|
Logs:
So, I switched toolchains from linaro to kox: - glibc 2.23 wont compile under kox, symbol error, so i figured well might as well go with 2.15 because kox does. wont compile either - dropbear 2019.77 does compile under kox only not with multi under linaro it would but i would be facing glibc too old error. Its like throwing craps in Vegas, its probably me but geez louise I'm going mad Last edited by BloodRagg; 03-27-2019 at 02:01 PM. |
03-27-2019, 12:03 PM | #30 |
BLAM!
Posts: 13,482
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Why do you want to compile the glibc? It's a *very* hairy process, best left to dedicated tools (f.g., buildroot), that no-one not actually building a distro should ever need to go through.
Last edited by NiLuJe; 03-27-2019 at 12:07 PM. |
Tags |
compile, crosscompile, examples, source code |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting up a development environment ... | BWinmill | Kobo Developer's Corner | 27 | 06-16-2014 08:21 AM |
help set up development environment? | brianinmaine | Kindle Developer's Corner | 7 | 01-19-2014 08:23 AM |
Problem with creating the development environment | rozen | Calibre | 6 | 05-29-2011 11:38 PM |
setup development environment | JeffElkins | Calibre | 21 | 10-22-2008 03:25 PM |
Setting up development environment | tompe | OpenInkpot | 9 | 08-27-2008 02:26 PM |