Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Yet another profile/catalyst adventure
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Wed Nov 24, 2021 2:15 am    Post subject: Yet another profile/catalyst adventure Reply with quote

Howdy all,

I'm trying to create a custom profile (let's call it zulu) which overrides some parts of @system set and so far I'm having pretty little success in it. My profile is based on musl one, so I've specified it inside of relevant parent file:

Code:

gentoo:default/linux/musl
../../../../../features/zulu


I'm not sure if I want to add arch-specific code yet, as I want it to be as generic as possible. Anyway, I've installed my overlay with the help of eselect-repository, and it's present inside of /var/repos/gentoo (alongside with the musl one); I can even select it with eselect profile.

I'm trying to follow official™ Catalyst doc from the Wiki, but I'm having this error while emerging stage1:

Code:

catalyst -f stage1.spec
...
copying make.conf to /var/tmp/catalyst/tmp/musl/stage1-amd64-latest/tmp/stage1root/etc/portage
Copying stage1-chroot.sh to /tmp
copying stage1-chroot.sh to /var/tmp/catalyst/tmp/musl/stage1-amd64-latest/tmp
copying chroot-functions.sh to /var/tmp/catalyst/tmp/musl/stage1-amd64-latest/tmp
Ensure the file has the executable bit set
Running stage1-chroot.sh in chroot:
    chroot /var/tmp/catalyst/tmp/musl/stage1-amd64-latest /tmp/stage1-chroot.sh
!!! Error: get_repo_path failed
exiting
!!! Invalid PORTDIR_OVERLAY (not a dir): '/var/gentoo/repos/local'
>>> Regenerating /etc/ld.so.cache...
!!! Invalid PORTDIR_OVERLAY (not a dir): '/var/gentoo/repos/local'
Updating seed stage...
emerge --quiet --buildpkg=n --update --deep --newuse @world
!!! Invalid PORTDIR_OVERLAY (not a dir): '/var/gentoo/repos/local'
cc>>> Verifying ebuild manifests


Stage emerges successfully (although the next one fails), but I don't understand where these errors are coming from. I suspect something is wrong with my repos? My stage1.spec file:

Code:

snapshot: latest # 2021.11.23
version_stamp: latest # 2021.11.23

subarch: amd64
target: stage1
rel_type: musl
profile: zulu:default/linux/amd64/17.0/musl/zulu
source_subpath: default/stage3-amd64-musl-latest
chost: x86_64-gentoo-linux-musl
portage_overlay: /root/musl /root/zulu

# portage_confdir: @REPO_DIR@/releases/portage/stages
portage_prefix: releng
update_seed: yes
update_seed_command: --update --deep --newuse @world
compression_mode: pixz


Can it be related to portage_overlay setting?
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Wed Nov 24, 2021 2:44 am    Post subject: Reply with quote

Hmm, as it turns out, paths inside of portage_overlay setting are absolute for my install... so /root -> /var/db/repos 8O
No more errors regarding profile...yet :D
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Wed Nov 24, 2021 8:19 pm    Post subject: Reply with quote

Ok after thorough digging, I came up to the conclusion that I need to make some changes to scripts/bootstrap.sh script; since I'm still using my custom profile I've thought it would be possible to just copy it over and alter what I need, but it seems that catalyst thinks otherwise...

Upon reading catalyst's sources, I come upon vars like $clst_repo_name (which resolves to gentoo) – but I cannot find where they're set and how I can override them? I mean of course I can copy whole catalyst to my profile and make a patch, but that seems too dumb – I feel like I'm missing something very obvious here.

Any advice is highly appreciated!!
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Thu Nov 25, 2021 9:00 pm    Post subject: Reply with quote

Emerge can automagically patch the sources at build time for you. Check this out:
https://wiki.gentoo.org/wiki//etc/portage/patches#Adding_user_patches

However, since you're talking about setting variables, there really should be a better way to do that. Maybe you can find a hint in the eclasses from which that ebuild inherits.
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Fri Nov 26, 2021 2:20 am    Post subject: Reply with quote

Thanks for your reply szatox... I can always go with hack-the-src way, but I still have the hope much of the stuff can be done via right configuration :D

Anyway, these are my findings so far:
- repo_basedir (/var/db/repos) and repo_name (gentoo) are set to these default values via pretty standard /etc/catalyst/catalyst.conf file (who would have thought it's mentioned in the manpage :lol: );
- catalyst will use full repo path to create stage snapshot as well (which's obvious), and it's quite useless for custom overlays unless they're copying half of ::gentoo one;
- it seems that $repo_name/scripts/bootstrap.sh file is somehow embedded into chrooting phase – or is it just being unpacked from the snapshot each time stage is set up for a build? I've come to this observation after trying to make local modifications to the script and not seeing their effect;
- while it seems that I can solve missing ebuilds problem via using something like OverlayFS and then combining my overlay with ::gentoo one, it seems there's no "official" way to deal with this problem... or there is?

One of the biggest confusions is also stage building behaviour: while stage1 is supposed to only bring toolchain, stage2 upon chrooting into it still get the very same toolchain packages queued and installed for some reason – but not the extra ones I've added to the stage1! I cannot understand where this set (binutils, gcc, etc) is coming from.
Back to top
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 918
Location: Richmond Hill, Canada

PostPosted: Fri Nov 26, 2021 5:11 pm    Post subject: Reply with quote

Hi 2857,

I am no expert in catalyst but just interesting in this topic. 5 month back I did bunch of catalyst build for musl/uclibc/glibc I run into many problems like you so I read catalyst code as well and I seems to remember the packages are somewhat hard code in script (don't remember where).

Anyway what part of @system you want to override?

Would it make sense to finish stage3 and use the stage3 build and for example use command
Code:
stage3-build-dir# emerge --root=/mnt/zulu ...
to build an target that specific to your desire?

Also have you check /etc/catalyst/catalystrc file? it is an envscript that you may be able to setup something that help you.
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Mon Nov 29, 2021 12:43 am    Post subject: Reply with quote

OK it's time for a full disclosure, I think it doesn't need a separate topic. I've decided to go somehow public, clean the code and make it somehow readable.

So, I've decided to create a profile which allows you to go completely gccless and use LLVM/Clang as a main system toolchain. There are many similar efforts and overlays and I've personally used Clang and musl overlays for quite a long time without much trouble, so it's in pretty good shape now I would say. You can also compile kernel with it (and, FINALLY, elfutils). The only trick is, all the info I've gathered tell you how to make such a transition from within a working system, but there's no way to have a prebuilt system of such kind; no easy way to use Clang globally without few quite painful world rebuilds with circular deps.

You can grab the code here: https://github.com/2b57/toolchain-clang

Current approach:
GCC and binutils seem to be still deeply embedded in some parts of the system, so I've created two virtuals to encapsulate them: virtual/toolchain and virtual/binutils (that's where I had to edit scripts/bootstrap.sh script). My idea is that new profile will hardmask gcc and binutils, and LLVM/Clang will be pulled as the alternatives...however it doesn't work that way yet and I don't know why.

Build starts from with a special bootstrap profile, which only pulls LLVM/Clang stuff for the next stage. stage2, however, uses "proper" profile which contains masks for GCC/binutils, and that's where things go really south: it really doesn't like masked binutils and just dies there despite I pull virtual package for install and not sys-devel one :?

Modifications to boostrap.sh scripts are fairly minimal and I do have a hope it will be accepted upstream but that's quite far goal I guess :D
Back to top
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 918
Location: Richmond Hill, Canada

PostPosted: Mon Nov 29, 2021 4:00 pm    Post subject: Reply with quote

2857 wrote:
I've decided to create a profile which allows you to go completely gccless and use LLVM/Clang as a main system toolchain
That's an admirable goal.


I wonder, if start a new base parallel to gentoo:profiles/default/linux/packages.build could be easier.

BTW, have you try change parent file contents order? place gentoo:default/linux/amd64/17.1 as first line and allow ../../../features/clang to overwrite.
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Mon Nov 29, 2021 5:55 pm    Post subject: Reply with quote

Thanks for your reply pingtoo, it seems that order inside of profile is truly inversed. Just pushed a fix and started new build, hope it will work.

Quote:
I wonder, if start a new base parallel to gentoo:profiles/default/linux/packages.build could be easier.

Good point, I see gcc/binutils also hardcoded there! I'm just trying to diverge from the "main" profile as little as possible, so end stages will be pretty harmless to start working with (and to minimize future work when Gentoo team will update profiles). I'm not sure if it's possible to override something going into packages.build though.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Nov 29, 2021 6:08 pm    Post subject: Reply with quote

2857,

Idle in #gentoo-releng on Libera IRC. The people that know catalyst are there.
You need to register your nick to be able to speak.
_________________
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
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Tue Nov 30, 2021 10:13 pm    Post subject: Reply with quote

Thanks for the tip! I will update the thread once I have some progress
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Thu Dec 02, 2021 10:47 am    Post subject: Reply with quote

Good news, with the help from IRC I was able to produce working stage1!

However, stage2 doesn't seem so bright yet because there's some issue with libtool; that's what I'm getting trying to emerge gettext:

Code:

libtool: link: (cd .libs/libtextstyle.lax/libglib_rpl.a && llvm-ar x "/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/lib/./.libs/libglib_rpl.a")
libtool: link: (cd .libs/libtextstyle.lax/libxml_rpl.a && llvm-ar x "/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/lib/./.libs/libxml_rpl.a")
libtool: link: (cd ".libs" && rm -f "libtextstyle.so.0" && ln -s "libtextstyle.so.0.1.1" "libtextstyle.so.0")
libtool: link: (cd ".libs" && rm -f "libtextstyle.so" && ln -s "libtextstyle.so.0.1.1" "libtextstyle.so")
libtool: link: rm -fr .libs/libtextstyle.lax
libtool: link: ( cd ".libs" && rm -f "libtextstyle.la" && ln -s "../libtextstyle.la" "libtextstyle.la" )
make[5]: Leaving directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/lib'
make[4]: Leaving directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/lib'
Making all in tests
make[4]: Entering directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/tests'
make  all-recursive
make[5]: Entering directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/tests'
Making all in .
make[6]: Entering directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/tests'
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/tests'
make[5]: Leaving directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/tests'
make[4]: Leaving directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/tests'
Making all in adhoc-tests
make[4]: Entering directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/adhoc-tests'
clang -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21/libtextstyle/adhoc-tests -I..  -I. -I/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21/libtextstyle/adhoc-tests -I.. -I../lib -I/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21/libtextstyle/adhoc-tests/../lib -DSRCDIR=\"/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21/libtextstyle/adhoc-tests/\"   -O2 -pipe -c -o hello.o /var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21/libtextstyle/adhoc-tests/hello.c
/bin/sh ../libtool  --tag=CC   --mode=link clang  -O2 -pipe  -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -o hello hello.o ../lib/libtextstyle.la
libtool: link: clang -O2 -pipe -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -o .libs/hello hello.o  -Wl,--as-needed ../lib/.libs/libtextstyle.so
clang-13: error: no such file or directory: '../lib/.libs/libtextstyle.so'
make[4]: *** [Makefile:1567: hello] Error 1
make[4]: Leaving directory '/var/tmp/portage/sys-devel/gettext-0.21-r1/work/gettext-0.21-abi_x86_64.amd64/libtextstyle/adhoc-tests'


I vaguely recall seeing something similar with other libtool-using packages...
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Thu Dec 02, 2021 1:37 pm    Post subject: Reply with quote

Same for libarchive:

Code:

/bin/sh ./libtool  --tag=CC   --mode=link clang  -O2 -pipe -Wall -Wformat -Wformat-security -no-undefined -version-info 18:2:5 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -o libarchive.la -rpath /usr/lib libarchive/archive_acl.lo libarchive/archive_check_magic.lo libarchive/archive_cmdline.lo libarchive/archive_cryptor.lo libarchive/archive_digest.lo libarchive/archive_entry.lo libarchive/archive_entry_copy_stat.lo libarchive/archive_entry_link_resolver.lo libarchive/archive_entry_sparse.lo libarchive/archive_entry_stat.lo libarchive/archive_entry_strmode.lo libarchive/archive_entry_xattr.lo libarchive/archive_getdate.lo libarchive/archive_hmac.lo libarchive/archive_match.lo libarchive/archive_options.lo libarchive/archive_pack_dev.lo libarchive/archive_pathmatch.lo libarchive/archive_ppmd7.lo libarchive/archive_ppmd8.lo libarchive/archive_random.lo libarchive/archive_rb.lo libarchive/archive_read.lo libarchive/archive_read_add_passphrase.lo libarchive/archive_read_append_filter.lo libarchive/archive_read_data_into_fd.lo libarchive/archive_read_disk_entry_from_file.lo libarchive/archive_read_disk_posix.lo libarchive/archive_read_disk_set_standard_lookup.lo libarchive/archive_read_extract.lo libarchive/archive_read_extract2.lo libarchive/archive_read_open_fd.lo libarchive/archive_read_open_file.lo libarchive/archive_read_open_filename.lo libarchive/archive_read_open_memory.lo libarchive/archive_read_set_format.lo libarchive/archive_read_set_options.lo libarchive/archive_read_support_filter_all.lo libarchive/archive_read_support_filter_bzip2.lo libarchive/archive_read_support_filter_by_code.lo libarchive/archive_read_support_filter_compress.lo libarchive/archive_read_support_filter_grzip.lo libarchive/archive_read_support_filter_gzip.lo libarchive/archive_read_support_filter_lrzip.lo libarchive/archive_read_support_filter_lz4.lo libarchive/archive_read_support_filter_lzop.lo libarchive/archive_read_support_filter_none.lo libarchive/archive_read_support_filter_program.lo libarchive/archive_read_support_filter_rpm.lo libarchive/archive_read_support_filter_uu.lo libarchive/archive_read_support_filter_xz.lo libarchive/archive_read_support_filter_zstd.lo libarchive/archive_read_support_format_7zip.lo libarchive/archive_read_support_format_all.lo libarchive/archive_read_support_format_ar.lo libarchive/archive_read_support_format_by_code.lo libarchive/archive_read_support_format_cab.lo libarchive/archive_read_support_format_cpio.lo libarchive/archive_read_support_format_empty.lo libarchive/archive_read_support_format_iso9660.lo libarchive/archive_read_support_format_lha.lo libarchive/archive_read_support_format_mtree.lo libarchive/archive_read_support_format_rar.lo libarchive/archive_read_support_format_rar5.lo libarchive/archive_read_support_format_raw.lo libarchive/archive_read_support_format_tar.lo libarchive/archive_read_support_format_warc.lo libarchive/archive_read_support_format_xar.lo libarchive/archive_read_support_format_zip.lo libarchive/archive_string.lo libarchive/archive_string_sprintf.lo libarchive/archive_util.lo libarchive/archive_version_details.lo libarchive/archive_virtual.lo libarchive/archive_write.lo libarchive/archive_write_disk_posix.lo libarchive/archive_write_disk_set_standard_lookup.lo libarchive/archive_write_open_fd.lo libarchive/archive_write_open_file.lo libarchive/archive_write_open_filename.lo libarchive/archive_write_open_memory.lo libarchive/archive_write_add_filter.lo libarchive/archive_write_add_filter_b64encode.lo libarchive/archive_write_add_filter_by_name.lo libarchive/archive_write_add_filter_bzip2.lo libarchive/archive_write_add_filter_compress.lo libarchive/archive_write_add_filter_grzip.lo libarchive/archive_write_add_filter_gzip.lo libarchive/archive_write_add_filter_lrzip.lo libarchive/archive_write_add_filter_lz4.lo libarchive/archive_write_add_filter_lzop.lo libarchive/archive_write_add_filter_none.lo libarchive/archive_write_add_filter_program.lo libarchive/archive_write_add_filter_uuencode.lo libarchive/archive_write_add_filter_xz.lo libarchive/archive_write_add_filter_zstd.lo libarchive/archive_write_set_format.lo libarchive/archive_write_set_format_7zip.lo libarchive/archive_write_set_format_ar.lo libarchive/archive_write_set_format_by_name.lo libarchive/archive_write_set_format_cpio.lo libarchive/archive_write_set_format_cpio_binary.lo libarchive/archive_write_set_format_cpio_newc.lo libarchive/archive_write_set_format_cpio_odc.lo libarchive/archive_write_set_format_filter_by_ext.lo libarchive/archive_write_set_format_iso9660.lo libarchive/archive_write_set_format_mtree.lo libarchive/archive_write_set_format_pax.lo libarchive/archive_write_set_format_raw.lo libarchive/archive_write_set_format_shar.lo libarchive/archive_write_set_format_ustar.lo libarchive/archive_write_set_format_v7tar.lo libarchive/archive_write_set_format_gnutar.lo libarchive/archive_write_set_format_warc.lo libarchive/archive_write_set_format_xar.lo libarchive/archive_write_set_format_zip.lo libarchive/archive_write_set_options.lo libarchive/archive_write_set_passphrase.lo libarchive/filter_fork_posix.lo libarchive/xxhash.lo  libarchive/archive_blake2s_ref.lo libarchive/archive_blake2sp_ref.lo      -lcrypto  -lxml2
libtool: link: ( cd ".libs" && rm -f "libarchive_fe.la" && ln -s "../libarchive_fe.la" "libarchive_fe.la" )
libtool: link: (cd ".libs" && rm -f "libarchive.so.13" && ln -s "libarchive.so.13.5.2" "libarchive.so.13")
libtool: link: (cd ".libs" && rm -f "libarchive.so" && ln -s "libarchive.so.13.5.2" "libarchive.so")
libtool: link: ( cd ".libs" && rm -f "libarchive.la" && ln -s "../libarchive.la" "libarchive.la" )
/bin/sh ./libtool  --tag=CC   --mode=link clang  -O2 -pipe -Wall -Wformat -Wformat-security  -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -o bsdtar tar/bsdtar-bsdtar.o tar/bsdtar-cmdline.o tar/bsdtar-creation_set.o tar/bsdtar-read.o tar/bsdtar-subst.o tar/bsdtar-util.o tar/bsdtar-write.o  libarchive.la libarchive_fe.la  -lcrypto  -lxml2
/bin/sh ./libtool  --tag=CC   --mode=link clang  -O2 -pipe -Wall -Wformat -Wformat-security  -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -o bsdcpio cpio/bsdcpio-cmdline.o cpio/bsdcpio-cpio.o  libarchive_fe.la libarchive.la  -lcrypto  -lxml2
/bin/sh ./libtool  --tag=CC   --mode=link clang  -O2 -pipe -Wall -Wformat -Wformat-security  -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -o bsdcat cat/bsdcat-bsdcat.o cat/bsdcat-cmdline.o  libarchive_fe.la libarchive.la  -lcrypto  -lxml2
libtool: link: clang -O2 -pipe -Wall -Wformat -Wformat-security -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -o .libs/bsdtar tar/bsdtar-bsdtar.o tar/bsdtar-cmdline.o tar/bsdtar-creation_set.o tar/bsdtar-read.o tar/bsdtar-subst.o tar/bsdtar-util.o tar/bsdtar-write.o  -Wl,--as-needed ./.libs/libarchive.so ./.libs/libarchive_fe.a -lcrypto -lxml2
libtool: link: clang -O2 -pipe -Wall -Wformat -Wformat-security -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -o .libs/bsdcpio cpio/bsdcpio-cmdline.o cpio/bsdcpio-cpio.o  -Wl,--as-needed ./.libs/libarchive_fe.a ./.libs/libarchive.so -lcrypto -lxml2
libtool: link: clang -O2 -pipe -Wall -Wformat -Wformat-security -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -o .libs/bsdcat cat/bsdcat-bsdcat.o cat/bsdcat-cmdline.o  -Wl,--as-needed ./.libs/libarchive_fe.a ./.libs/libarchive.so -lcrypto -lxml2
clang-13: error: no such file or directory: './.libs/libarchive.so'
clang-13: error: no such file or directory: './.libs/libarchive.so'
make[1]: *** [Makefile:4440: bsdcpio] Error 1
Back to top
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 918
Location: Richmond Hill, Canada

PostPosted: Thu Dec 02, 2021 3:37 pm    Post subject: Reply with quote

I wonder if this is cause by missing lib64 or usr/lib64?

I have some notes about run into problems during stage build for missing lib... but don't have exact detail of what the errors are. My notes said make symbolic link for /usr/<target-chost>/lib64 and /usr/<target-chost>/usr/lib64 to /lib64 and /usr/lib64 fix the problem. I am not sure about why create/replace /lib64 and /usr/lib64.
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Fri Dec 03, 2021 12:42 am    Post subject: Reply with quote

I don't think so, because it's based on musl/17.0 profile, which's no-multilib. I've looked up other Clang-based distros (Adelie, OpenMandriva, Chimera) – all seem to switch to gettext-tiny. While it's a viable option, libarchive fails with exactly same error... I suppose it's some libtool bug? Also MacOS build of gettext succeeds, because there's gcc -> clang symlink, and configure script thinks it's native GCC :lol:
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Fri Dec 03, 2021 5:09 pm    Post subject: Reply with quote

Thanks to Sam, problem was resolved by using
Code:
 LD="ld.lld"


Also looks like there's some chroot issue because packages which are being queued by bootstrap.sh script don't have their deps resolved – emerge thinks they're already installed, so obviously it somehow uses seed stage and not the target stage... anyway:

Code:

# ls -lha /var/tmp/catalyst/builds/clang-musl/
total 314M
drwxr-xr-x 2 root root 4.0K Dec  3 17:07 .
drwxr-xr-x 4 root root 4.0K Dec  1 23:49 ..
-rw-r--r-- 1 root root 162M Dec  2 09:43 stage1-amd64-clang-musl-2021.12.02.tar.xz
-rw-r--r-- 1 root root 236K Dec  2 09:43 stage1-amd64-clang-musl-2021.12.02.tar.xz.CONTENTS.gz
-rw-r--r-- 1 root root  856 Dec  2 09:43 stage1-amd64-clang-musl-2021.12.02.tar.xz.DIGESTS
-rw-r--r-- 1 root root 152M Dec  3 17:07 stage2-amd64-clang-musl-2021.12.03.tar.xz
-rw-r--r-- 1 root root 245K Dec  3 17:07 stage2-amd64-clang-musl-2021.12.03.tar.xz.CONTENTS.gz
-rw-r--r-- 1 root root  856 Dec  3 17:07 stage2-amd64-clang-musl-2021.12.03.tar.xz.DIGESTS


Now to check if it works...
Back to top
View user's profile Send private message
2857
n00b
n00b


Joined: 24 Nov 2021
Posts: 12

PostPosted: Sat Dec 04, 2021 10:05 pm    Post subject: Reply with quote

Good news everyone! Thanks to enormous amount of help from IRC I've managed to build a usable stage3!

Feel free to grab it here: https://github.com/2b57/toolchain-clang/releases
Back to top
View user's profile Send private message
Oleksa75
n00b
n00b


Joined: 18 Oct 2021
Posts: 15

PostPosted: Mon Dec 20, 2021 3:26 am    Post subject: Reply with quote

2857 wrote:
Good news everyone! Thanks to enormous amount of help from IRC I've managed to build a usable stage3!

Feel free to grab it here: https://github.com/2b57/toolchain-clang/releases


Hello there!

I want to test a bit Your new profile, but have not too much dev skills.

Please, can You detail in few words - is update way the same as for "typical" profile?
Or may be there some specific things will occur?

And is it possible, based on Your profile, to prepare minimal desktop configuration?
In case I;ll setup additional packages like X-org or Wayland - will it work?
I just want to use it at laptop - with Cinnamon or XFCE environment.

And please, detail - how to compile kernel (with modules) with Your profile? From gentoo-sources package, for example

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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