Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on Alternative Architectures
  • Search

Gentoo-Prefix on OpenBSD@amd64, discussion thread

Post here for other supported architectures, or if you are interested in porting Gentoo to a currently unsupported architecture.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
Massimo B.
Veteran
Veteran
User avatar
Posts: 1940
Joined: Wed Feb 09, 2005 3:05 pm
Location: PB, Germany

Gentoo-Prefix on OpenBSD@amd64, discussion thread

  • Quote

Post by Massimo B. » Mon Jan 20, 2020 10:26 am

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: Select all

$ 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: Select all

$ ./configure --prefix=$HOME ; make -j4 && make install || make install PREFIX=$HOME
List of tarballs:

Code: Select all

$ 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: Select all

$ 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: Select all

$ 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 ... b7a186d8bc :

Code: Select all

$ 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: Select all

${EPREFIX}/bootstrap-prefix.sh ${EPREFIX} stage1
Last edited by Massimo B. on Thu Feb 20, 2020 8:45 am, edited 3 times in total.
HP ZBook Power G9 i7-12700H,64GB DDR5|HP ProDesk 600 G5 i7-9700,128GB DDR4
Top
Massimo B.
Veteran
Veteran
User avatar
Posts: 1940
Joined: Wed Feb 09, 2005 3:05 pm
Location: PB, Germany

  • Quote

Post by Massimo B. » Thu Jan 30, 2020 3:19 pm

I'm going to discuss some of the issue here in the comment history...

Code: Select all

 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: Select all

 424         importlib._bootstrap._load(spec)
 425         try:
 426             1==0
 427         except ImportError as why:
Then I get

Code: Select all

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 G9 i7-12700H,64GB DDR5|HP ProDesk 600 G5 i7-9700,128GB DDR4
Top
Post Reply

2 posts • Page 1 of 1

Return to “Gentoo on Alternative Architectures”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic