View previous topic :: View next topic |
Author |
Message |
Massimo B. Veteran
Joined: 09 Feb 2005 Posts: 1810 Location: PB, Germany
|
Posted: Mon Jan 20, 2020 10:26 am Post subject: Gentoo-Prefix on OpenBSD@amd64, discussion thread |
|
|
I can't get Gentoo-Prefix built on OpenBSD and like to solve some issues in this thread. This first post will be continuously updated and later copied to the Documentation forum as Howto.
Howto build a Prefix on OpenBSD@amd64
I have built some GNU tools to ~/bin which have been failing with the BSD versions during the bootstrap process...
Code: |
$ ls ~/bin
2to3 chmod dir false idle3.6 md5sum od pwd pyvenv-3.6 sha384sum sync tsort who
2to3-3.6 chown dircolors fgrep install mkdir om4 pydoc3 readlink sha512sum tac tty whoami
'[' chroot dirname find join mkfifo paste pydoc3.6 realpath shred tail uname xargs
b2sum cksum du fmt kill mknod pathchk python rm shuf tar unexpand yes
base32 comm easy_install-3.6 fold link mktemp pinky python3 rmdir sleep tee uniq
base64 cp echo grep ln mv pip3 python3-config runcon sort test unlink
basename csplit egrep groups locate nice pip3.6 python3.6 sed split timeout updatedb
basenc cut env head logname nl pr python3.6-config seq stat touch uptime
cat date expand hostid ls nohup printenv python3.6m sha1sum stdbuf tr users
chcon dd expr id m4 nproc printf python3.6m-config sha224sum stty true vdir
chgrp df factor idle3 make numfmt ptx pyvenv sha256sum sum truncate wc
|
Most GNU tools have been built and installed like Code: | $ ./configure --prefix=$HOME ; make -j4 && make install || make install PREFIX=$HOME |
List of tarballs: Code: |
$ ls *.tar.* *.tgz
Python-3.6.10.tgz coreutils-8.31.tar.xz findutils-4.7.0.tar.xz grep-3.4.tar.xz m4-1.4.17.tar.xz make-4.2.tar.gz sed-4.8.tar.xz tar-1.32.tar.gz zlib-1.2.11.tar.gz
|
Code: | $ export EPREFIX="${HOME}/gentoo"
$ mkdir "$EPREFIX"
$ cd "$EPREFIX"
$ wget https://gitweb.gentoo.org/repo/proj/prefix.git/plain/scripts/bootstrap-prefix.sh
$ chmod 755 bootstrap-prefix.sh | Then I just patched the FreeBSD case to be used for OpenBSD:
Code: | $ diff bootstrap-prefix.sh bootstrap-prefix.sh.orig
2953c2953
< OpenBSD)
---
> FreeBSD) |
I took some old OpenBSD profile I found at https://cgit.gentoo.org/user/palmer.git/commit/profiles/prefix/bsd/openbsd?h=old&id=25d23e6b17fd4d85abe5aa2ed03f91b7a186d8bc :
Code: | $ wget https://cgit.gentoo.org/user/palmer.git/snapshot/palmer-25d23e6b17fd4d85abe5aa2ed03f91b7a186d8bc.tar.gz
$ tar xvfz palmer-25d23e6b17fd4d85abe5aa2ed03f91b7a186d8bc.tar.gz
$ mkdir -p etc/portage
$ ln -s ../../palmer-25d23e6b17fd4d85abe5aa2ed03f91b7a186d8bc/profiles/prefix/bsd/openbsd etc/portage/make.profile |
Code: | ${EPREFIX}/bootstrap-prefix.sh ${EPREFIX} stage1 |
_________________ HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Last edited by Massimo B. on Thu Feb 20, 2020 8:45 am; edited 3 times in total |
|
Back to top |
|
|
Massimo B. Veteran
Joined: 09 Feb 2005 Posts: 1810 Location: PB, Germany
|
Posted: Thu Jan 30, 2020 3:19 pm Post subject: |
|
|
I'm going to discuss some of the issue here in the comment history...
Code: | File "/home/mo/gentoo/tmp/usr/lib/python3.6/gzip.py", line 9, in <module>
import zlib
ModuleNotFoundError: No module named 'zlib' |
I needed to patch /home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/setup.py:
Line 425 now looks like:
Code: | 424 importlib._bootstrap._load(spec)
425 try:
426 1==0
427 except ImportError as why: |
Then I get Code: | clang -pthread -shared -fPIC -m64 -L/home/mo/gentoo/tmp/usr/lib -m64 -L/home/mo/gentoo/tmp/usr/lib -m64 -L/home/mo/gentoo/tmp/usr/lib -m64 -I/home/mo/gentoo/tmp/usr/include build/temp.openbsd-6.6-amd64-3.6/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Modules/_ctypes/_ctypes.o build/temp.openbsd-6.6-amd64-3.6/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Modules/_ctypes/callbacks.o build/temp.openbsd-6.6-amd64-3.6/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Modules/_ctypes/callproc.o build/temp.openbsd-6.6-amd64-3.6/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Modules/_ctypes/stgdict.o build/temp.openbsd-6.6-amd64-3.6/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Modules/_ctypes/cfield.o -L/home/mo/gentoo/tmp/usr/lib -L/usr/local/lib -lffi -o build/lib.openbsd-6.6-amd64-3.6/_ctypes.so
Traceback (most recent call last):
File "./setup.py", line 2416, in <module>
main()
File "./setup.py", line 2411, in main
"Tools/scripts/2to3", "Tools/scripts/pyvenv"]
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mo/gentoo/var/tmp/python-3.6.10/Python-3.6.10/Lib/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "./setup.py", line 312, in build_extensions
self.check_extension_import(ext)
File "./setup.py", line 424, in check_extension_import
importlib._bootstrap._load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
File "<frozen importlib._bootstrap>", line 571, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 922, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: Cannot load specified object
make: *** [Makefile:603: sharedmods] Error 1 |
_________________ HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770 |
|
Back to top |
|
|
|
|
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
|
|