View previous topic :: View next topic |
Author |
Message |
DeadToRight n00b
Joined: 28 Jun 2018 Posts: 22
|
Posted: Mon Jul 09, 2018 12:00 pm Post subject: [SOLVED]"ar: invalid option -- 's'" when compiling |
|
|
I used a different distro to chroot in and build the system and kernel. the kernel still builds inside that chroot, if reopened that way.
Quote: | AR /usr/src/linux-4.17.4-gentoo/tools/objtool/libsubcmd.a
ar: invalid option -- 's'
BusyBox v1.28.0 (2018-07-09 07:47:48 EDT) multi-call binary.
Usage: ar [-o] [-v] [-p] [-t] [-x] ARCHIVE FILES
Extract or list FILES from an ar archive
-o Preserve original dates
-p Extract to stdout
-t List
-x Extract
-v Verbose
make[3]: *** [Makefile:55: /usr/src/linux-4.17.4-gentoo/tools/objtool/libsubcmd.a] Error 1
make[2]: *** [Makefile:54: /usr/src/linux-4.17.4-gentoo/tools/objtool/libsubcmd.a] Error 2
make[1]: *** [Makefile:63: objtool] Error 2
make: *** [Makefile:1699: tools/objtool] Error 2
|
Last edited by DeadToRight on Mon Jul 09, 2018 7:41 pm; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Jul 09, 2018 12:28 pm Post subject: |
|
|
DeadToRight ...
it looks as though the 'ar' within the chroot is a link to busybox ... which doesn't support the '-s' switch. This is probably the result of having run 'busybox --install', which will create symlinks for all busybox commands, and so break your stage3/4.
best ... khay |
|
Back to top |
|
|
DeadToRight n00b
Joined: 28 Jun 2018 Posts: 22
|
Posted: Mon Jul 09, 2018 12:46 pm Post subject: |
|
|
khayyam wrote: | DeadToRight ...
it looks as though the 'ar' within the chroot is a link to busybox ... which doesn't support the '-s' switch. This is probably the result of having run 'busybox --install', which will create symlinks for all busybox commands, and so break your stage3/4.
best ... khay | Any suggestions for rebuilding around this? It still performs normally inside a chroot.
You know what? I'm grabbing a fresh stage3. not yet for reinstalling. but for a template on how to lay out the symlinks. found the one for ar in /usr/bin.
Is there a good list of where to find what all busybox --install overwrites? |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Jul 09, 2018 1:48 pm Post subject: |
|
|
DeadToRight wrote: | Is there a good list of where to find what all busybox --install overwrites? |
DeadToRight ... all the 'currently defined functions' listed in 'busybox --help', so all of the following:
Code: | # for i in $(busybox --help | awk '/^C/{y=1;next};{gsub(/(\,|\[|\])/,"")}y') ; do which "$i" ; done |
... and note, I'm excluding "[" and "]" in the output (because of how the shell will interpret them), so those also.
HTH & best ... khay |
|
Back to top |
|
|
DeadToRight n00b
Joined: 28 Jun 2018 Posts: 22
|
Posted: Mon Jul 09, 2018 4:35 pm Post subject: |
|
|
khayyam wrote: | DeadToRight wrote: | Is there a good list of where to find what all busybox --install overwrites? |
DeadToRight ... all the 'currently defined functions' listed in 'busybox --help', so all of the following:
Code: | # for i in $(busybox --help | awk '/^C/{y=1;next};{gsub(/(\,|\[|\])/,"")}y') ; do which "$i" ; done |
... and note, I'm excluding "[" and "]" in the output (because of how the shell will interpret them), so those also.
HTH & best ... khay | that's a fun list to rm. gonna have to install the stage3 from outside the chroot to even be able to... anything, really. and then rebuild... well, less than the whole system at first. better move make.conf first though.
And then:
FEATURES="-collision-detection" emerge -av1 <oh god>
libressl seems a reasonable starting point. Then glib. then @preserved-rebuild. then @system. And then passwd <each user>
And then reboot outta chroot, and try building a test kernel. If such works, I might wanna try something crazy like a emerge -NavuDe @world. or should I consider the ol' bootstrap a la: https://wiki.gentoo.org/wiki/Fix_My_Gentoo
Last edited by DeadToRight on Mon Jul 09, 2018 5:24 pm; edited 1 time in total |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Jul 09, 2018 5:21 pm Post subject: |
|
|
DeadToRight ...
you might be better using 'equery' or 'qcheck --badonly' and pass those to emerge, eg:
Code: | # emerge --oneshot $(qcheck --badonly --skip-protected --nocolor) |
best ... khay |
|
Back to top |
|
|
DeadToRight n00b
Joined: 28 Jun 2018 Posts: 22
|
Posted: Mon Jul 09, 2018 7:41 pm Post subject: |
|
|
khayyam wrote: | DeadToRight ...
you might be better using 'equery' or 'qcheck --badonly' and pass those to emerge, eg:
Code: | # emerge --oneshot $(qcheck --badonly --skip-protected --nocolor) |
best ... khay | That... would have been so much easier.
As it is, Im a cringe-story for the toolchain devs. But it boots, it compiles the kernel, its recompiling the rest. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Tue Jul 10, 2018 1:51 am Post subject: |
|
|
khayyam wrote: | DeadToRight ... all the 'currently defined functions' listed in 'busybox --help', so all of the following:
Code: | # for i in $(busybox --help | awk '/^C/{y=1;next};{gsub(/(\,|\[|\])/,"")}y') ; do which "$i" ; done |
| This can be simplified by using busybox --list instead: Code: | busybox --list | xargs -d'\n' which |
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Jul 10, 2018 11:45 am Post subject: |
|
|
khayyam wrote: | Code: | # for i in $(busybox --help | awk '/^C/{y=1;next};{gsub(/(\,|\[|\])/,"")}y') ; do which "$i" ; done |
|
Hu wrote: | This can be simplified by using busybox --list instead:
Code: | busybox --list | xargs -d'\n' which |
|
Hu ... tnx, wasn't aware of that option.
best ... khay |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Wed Jul 11, 2018 2:30 am Post subject: |
|
|
Me either. I spent a few minutes trying to rewrite the gawk command to be safe to use with a while read loop, got annoyed at dealing with the whitespace that busybox was generating, and reviewed the help looking for other ways to get the command list in a more usable form. When I found --list, it did exactly what I needed. |
|
Back to top |
|
|
|