1 |
Here's more information about the system. |
2 |
|
3 |
DSM 6.0 is a Debian based 64bit system. The company behind it haven't |
4 |
released the toolchain for 6.0 version yet but I have a working toolchain |
5 |
for DSM 5.2 which should be fine to bootstrap a prefix I assume. |
6 |
|
7 |
I believe this is not a static only system since the binary (bash, ls, |
8 |
etc.) are all dynamically linked. Here's the result from file (there's no |
9 |
file command in system so I copied the binary to another server to get this |
10 |
result): bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), |
11 |
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped |
12 |
|
13 |
/lib/libc.a is not included in the system, I created a symlink to the one |
14 |
in the toolchain because when building gcc it complained that libc.a cannot |
15 |
be found. |
16 |
|
17 |
So far I have tried the following steps: |
18 |
|
19 |
1. Run bootstrap-prefix.sh, stage2 failed with: |
20 |
|
21 |
/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld: cannot find crti.o: No |
22 |
such file or directory |
23 |
/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc |
24 |
/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld: cannot find crtn.o: No |
25 |
such file or directory |
26 |
collect2: error: ld returned 1 exit status |
27 |
make[2]: *** [libgcc_s.so] Error 1 |
28 |
make[2]: Leaving directory |
29 |
`/volume1/gentoo/tmp/var/tmp/portage/sys-devel/gcc-4.8.4/work/build/x86_64-pc-linux-gnu/libgcc' |
30 |
make[1]: *** [all-target-libgcc] Error 2 |
31 |
make[1]: Leaving directory |
32 |
`/volume1/gentoo/tmp/var/tmp/portage/sys-devel/gcc-4.8.4/work/build' |
33 |
make: *** [all] Error 2 |
34 |
|
35 |
2. Modify $EPREFIX/tmp/etc/portage/make.conf and use |
36 |
LDFLAGS="-L$TOOLCHAIN/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib" |
37 |
where crti.o/crtn.o located, but same error as step 1. |
38 |
|
39 |
3. Noticed ld's default search directory, I created symlink to |
40 |
$TOOLCHAIN/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/lib |
41 |
at $EPREFIX/tmp/usr/x86_64-pc-linux-gnu/lib64 |
42 |
|
43 |
$ /volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld --verbose|grep SEARCH |
44 |
SEARCH_DIR("/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/lib64"); |
45 |
SEARCH_DIR("/volume1/gentoo/tmp/usr/lib/binutils/x86_64-pc-linux-gnu/2.2464"); |
46 |
SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); |
47 |
SEARCH_DIR("/usr/lib64"); |
48 |
SEARCH_DIR("/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/lib"); |
49 |
SEARCH_DIR("/volume1/gentoo/tmp/usr/lib/binutils/x86_64-pc-linux-gnu/2.24"); |
50 |
SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); |
51 |
|
52 |
But still some error: |
53 |
/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld: cannot find crti.o: No |
54 |
such file or directory |
55 |
/volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld: cannot find |
56 |
/usr/lib64/libc_nonshared.a |
57 |
collect2: error: ld returned 1 exit status |
58 |
make[2]: *** [libgcc_s.so] Error 1 |
59 |
make[2]: Leaving directory |
60 |
`/volume1/gentoo/tmp/var/tmp/portage/sys-devel/gcc-4.8.4/work/build/x86_64-pc-linux-gnu/libgcc' |
61 |
make[1]: *** [all-target-libgcc] Error 2 |
62 |
make[1]: Leaving directory |
63 |
`/volume1/gentoo/tmp/var/tmp/portage/sys-devel/gcc-4.8.4/work/build' |
64 |
make: *** [all] Error 2 |
65 |
|
66 |
So I'm here now, completely clueless... |
67 |
|
68 |
|
69 |
|
70 |
On Mon, Jan 25, 2016 at 10:43 PM, Fabian Groffen <grobian@g.o> wrote: |
71 |
|
72 |
> On 25-01-2016 18:53:33 -0800, yegle wrote: |
73 |
> > I'm trying to bootstrap a prefix in my NAS (a Synology product running |
74 |
> 64bit |
75 |
> > DSM 6.0 beta2) and encountered this error: |
76 |
> > |
77 |
> > /volume1/gentoo/tmp/usr/x86_64-pc-linux-gnu/bin/ld: |
78 |
> /lib64/libc.a(genops.o): |
79 |
> > relocation R_X86_64_32 against `_pthread_cleanup_push_defer' can not be u |
80 |
> > sed when making a shared object; recompile with -fPIC |
81 |
> > /lib64/libc.a: error adding symbols: Bad value |
82 |
> > collect2: error: ld returned 1 exit status |
83 |
> > |
84 |
> > Does anyone have experience with this problem? Thank you. |
85 |
> |
86 |
> It looks like the system is static only (libc.a), I've got little |
87 |
> experience with those kinds of situations. |
88 |
> Maybe you can set the static USE-flag globally or something, FreeMiNT is |
89 |
> also static-only, the tc-is-static-only function was introduced for |
90 |
> them. |
91 |
> |
92 |
> Fabian |
93 |
> |
94 |
> -- |
95 |
> Fabian Groffen |
96 |
> Gentoo on a different level |
97 |
> |
98 |
|
99 |
|
100 |
|
101 |
-- |
102 |
Yuchen Ying |
103 |
http://about.me/yegle |