DaemonForums  

Go Back   DaemonForums > Other Operating Systems > Solaris

Solaris SUN Solaris & OpenSolaris.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd October 2021
berni51's Avatar
berni51 berni51 is offline
Real Name: Bernhard Ernst
Fdisk Soldier
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 46
Default pkgsrc for Tribblix?

Hello again,
as I miss some nice apps for my Tribblix I installed the NetBSD pkgsrc package.
Unfortunately I had no succes to bootstrap the package. The bootstrap ends up in an error with the message:

ld: Relocatable linking with relocations from format elf64-x86-64-soll2 (common.o.o) to format elf32-i386-sol2 (common.o) is not supported.
***Error code 1

I am not a C programmer and have no idea how to solve the issue. Has anybody pkgsrc got to work on Tribblix?

Regards
Berni
Reply With Quote
  #2   (View Single Post)  
Old 24th October 2021
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default

Quote:
Originally Posted by berni51 View Post
ld: Relocatable linking with relocations from format elf64-x86-64-soll2 (common.o.o) to format elf32-i386-sol2 (common.o) is not supported.
***Error code 1
Try with:
Code:
# ./boostrap --abi=64
Or you could try install the the pkgsrc zap overlay, but I don't know how up to date that is.
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„
Reply With Quote
  #3   (View Single Post)  
Old 24th October 2021
berni51's Avatar
berni51 berni51 is offline
Real Name: Bernhard Ernst
Fdisk Soldier
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 46
Default

Thanks, but it did'nt work: The same message as before.
Will have a look to the overlay.
Reply With Quote
  #4   (View Single Post)  
Old 5th November 2021
gpatrick gpatrick is offline
Spam Deminer
 
Join Date: Nov 2009
Posts: 245
Default

You ran?
Code:
# zap install-overlay develop
Reply With Quote
  #5   (View Single Post)  
Old 6th November 2021
berni51's Avatar
berni51 berni51 is offline
Real Name: Bernhard Ernst
Fdisk Soldier
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 46
Default

Yes, develp as well as develp-extras overlays are installed. I just tried it again but with the same bad result as mentioned afore.

It was no problem to bootstrap pkgsrc on Openindiana.
Reply With Quote
  #6   (View Single Post)  
Old 3rd April 2022
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default

So, back on Tribblix after a long hiatus; I attempted to find a fix to this problem. Similarly to Solaris 10 and other illumos distributions, Tribblix comes with a mixed 32/64 bit userland and in particular, stores 32bit gcc-libs (like libstdc++.so) at /usr/lib and 64 bit ones at /usr/lib/amd64.

The gcc binary found in /usr/bin is a 32bit ELF.

A possibility would be to play with crle(1) / LD_LIBRARY_PATH, prepending the 64-bit lib dirs and bootstraping with --compiler "gcc -m64". Honestly, I got a pkgsrc binary bootstrap from Joyent, which extracts 64bit gcc-libs inside /opt/local/gcc10. From there, you can compile/download a 64bit gcc10 and start building from source (or take Joyent's binaries which work well).
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„

Last edited by Sehnsucht94; 22nd April 2022 at 11:35 AM.
Reply With Quote
  #7   (View Single Post)  
Old 15th April 2022
jkl jkl is offline
dat guy
 
Join Date: Feb 2014
Posts: 104
Default

Note that Joyent has basically sold everything, so it'll require caution in the future again.
Reply With Quote
  #8   (View Single Post)  
Old 22nd April 2022
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default

Tried again today and it fails with the same error, even after passing CFLAGS+='-m64' and --abi 64. Unfortunately it seems that the 32-bit GCC 7.3.0 binary shipped with Tribblix m25 is producing some 32-bit shared object while attempting to compile libfetch, and the build of pkgtools/pkg_install fails while trying to link it. This is somewhat strange, considering that mixed userland used to be the norm on Solaris systems and bootstrapping with 32-bit GCC has never represented a problem.

I reckon that using --abi 32 is a very poor workaround, but at least works and makes the bootstrap process complete successfully (tested).

Quote:
Originally Posted by jkl View Post
Note that Joyent has basically sold everything, so it'll require caution in the future again.
Yes, I've heard about it unfortunately.

Anyway, there are other places where to get a 64bit GCC to bootstrap pkgsrc, but Joyent. First, illumos is binary backward compatible with SunOS 5.10, so older GCC 4/5.x SVR4 binaries for Solaris 10 should just work. Newer gcc versions could be taken from OpenIndiana's repo and converted to a SVR4 package with ips2svr4.

I think both Peter Tribble and @pkgsrc-bugs should be nevertheless noticed of the issue.
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„

Last edited by Sehnsucht94; 3rd May 2022 at 02:29 PM.
Reply With Quote
  #9   (View Single Post)  
Old 27th April 2022
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default

Quote:
Originally Posted by berni51 View Post
I am not a C programmer and have no idea how to solve the issue. Has anybody pkgsrc got to work on Tribblix?

So, the problem was with GNU linker not being capable of handling a multi-arch environment, while illumos link-editor supports dynamically switching between 32-bit and 64-bit objects (and optionally passing the -32|-64 command-line options). From the ld(1) man page:
Quote:
The link-editor, ld, combines relocatable object files by resolving
symbol references to symbol definitions, together with performing
relocations. ld operates in two modes, static or dynamic, as governed by
the -d option.
Quote:
By default, the class of the object being generated is determined

from the first ELF object processed from the command line. If no
objects are specified, the class is determined by the first object
encountered within the first archive processed from the command line.
If there are no objects or archives, the link-editor creates a 32-bit
object.
Putting /usr/gnu/bin at the end of one's PATH – so as to use /usr/bin/ld as opposed to /usr/gnu/bin/ld – sorts the issue out. Upon specifying a custom PATH in the environment:
Code:
# env PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/gnu/bin ./bootstrap --abi 64 --prefix /opt/pkg
The bootstrap process completes just fine.
Easier done than said!
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„

Last edited by Sehnsucht94; 3rd May 2022 at 02:28 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tribblix & OmniOSCE OpenSolaris/IllumOS Unix on same PC (same rpool?) dchmelik Solaris 2 12th February 2022 06:19 PM
Pkgsrc Idea fn8t NetBSD Package System (pkgsrc) 2 7th September 2014 03:28 PM
wip pkgsrc kaludis NetBSD Installation and Upgrading 1 16th April 2014 02:54 AM
Which is the significance about pkgsrc-2009Q2 and pkgsrc-2009Q3? aleunix NetBSD Package System (pkgsrc) 3 16th December 2009 07:19 AM
pkgsrc on OpenBSD Oko OpenBSD Packages and Ports 3 22nd December 2008 06:51 PM


All times are GMT. The time now is 08:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick