Please use ports@ for ports related discussions.

On Mon, Aug 26, 2019 at 04:03:23PM -0600, j...@bitminer.ca wrote:
> For ports package gcc-8.3.0p3, on abd64, using -current.
> 
> The shared lib liblto_plugin.so.5.0 is installed
> but no link is created. Thus egcc-ar (and egcc-ranlib and egcc-nm) fail:
> 

This is consistent with how OpenBSD handles shared libraries,
we don't usually create .so links for shared libraries.

https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs

Looking more closely this, it appears to be a GCC plugin, and not a
library intended to linked with, but dynamically loaded.

ktrace(1) shows that GCC is first trying to stat/access(2) the plugin
path instead of just calling dlopen(3) and checking for failure.

The port will need to be patched..

> snaptest66# cd /usr/local/libexec/gcc/x86_64-unknown-openbsd6.6/8.3.0/
> snaptest66# ls -l
> total 208420
> -rwxr-xr-x  1 root  bin    25847384 Aug 22 14:13 cc1
> -rwxr-xr-x  1 root  bin    27367192 Aug 22 14:13 cc1plus
> -rwxr-xr-x  1 root  bin      639696 Aug 22 14:13 collect2
> -rwxr-xr-x  1 root  bin    26805056 Aug 22 14:13 f951
> drwxr-xr-x  2 root  wheel       512 Aug 23 10:29 install-tools
> -rwxr-xr-x  1 root  bin         989 Aug 22 14:13 liblto_plugin.la
> -rw-r--r--  1 root  bin      108688 Aug 22 14:13 liblto_plugin.so.5.0
> -rwxr-xr-x  1 root  bin     1077840 Aug 22 14:13 lto-wrapper
> -rwxr-xr-x  1 root  bin    24795680 Aug 22 14:13 lto1
> drwxr-xr-x  2 root  wheel       512 Aug 23 10:29 plugin
> snaptest66# exit
> snaptest66$ egcc-nm -V
> egcc-nm: Cannot find plugin 'liblto_plugin.so'
> snaptest66$ egcc-ar -V
> egcc-ar: Cannot find plugin 'liblto_plugin.so'
> snaptest66$ egcc-ranlib -V
> egcc-ranlib: Cannot find plugin 'liblto_plugin.so'
> snaptest66$ \su -
> Password:
> snaptest66# cd /usr/local/libexec/gcc/x86_64-unknown-openbsd6.6/8.3.0/
> snaptest66# ln -s liblto_plugin.so.5.0 liblto_plugin.so
> snaptest66# ls -l
> total 208420
> -rwxr-xr-x  1 root  bin    25847384 Aug 22 14:13 cc1
> -rwxr-xr-x  1 root  bin    27367192 Aug 22 14:13 cc1plus
> -rwxr-xr-x  1 root  bin      639696 Aug 22 14:13 collect2
> -rwxr-xr-x  1 root  bin    26805056 Aug 22 14:13 f951
> drwxr-xr-x  2 root  wheel       512 Aug 23 10:29 install-tools
> -rwxr-xr-x  1 root  bin         989 Aug 22 14:13 liblto_plugin.la
> lrwxr-xr-x  1 root  wheel        20 Aug 26 14:57 liblto_plugin.so ->
> liblto_plugin.so.5.0
> -rw-r--r--  1 root  bin      108688 Aug 22 14:13 liblto_plugin.so.5.0
> -rwxr-xr-x  1 root  bin     1077840 Aug 22 14:13 lto-wrapper
> -rwxr-xr-x  1 root  bin    24795680 Aug 22 14:13 lto1
> drwxr-xr-x  2 root  wheel       512 Aug 23 10:29 plugin
> snaptest66# exit
> snaptest66$ egcc-ar -V
> /usr/bin/ar: illegal option -- -
> Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV]
> [member-name] [count] archive-file file...
>        /usr/bin/ar -M [<mri-script]
>  commands:
>   d            - delete file(s) from the archive
>   m[ab]        - move file(s) in the archive
>   p            - print file(s) found in the archive
> ....etc...works!
> 
> 
> snaptest66$ pkg_info
> boost-1.66.0p6      free peer-reviewed portable C++ source libraries
> bzip2-1.0.8         block-sorting file compressor, unencumbered
> flang-8.0.0.20190801 LLVM Fortran compiler passes and runtime library
> flang-driver-8.0.0.20190621p0 LLVM Fortran compiler driver
> g++-8.3.0p3         GNU compiler collection: C++ compiler
> g95-8.3.0p3         GNU compiler collection: f95 compiler
> gcc-8.3.0p3         GNU compiler collection: core C compiler
> gcc-libs-8.3.0p3    GNU compiler collection: support libs
> gettext-runtime-0.20.1p0 GNU gettext runtime libraries and programs
> gmp-6.1.2p3         library for arbitrary precision arithmetic
> icu4c-64.2p0        International Components for Unicode
> intel-firmware-20190618p0v0 microcode update binaries for Intel CPUs
> libaio_compat-5.2.2 port of POSIX asynchronous I/O routines from DragonFly
> BSD
> libexecinfo-0.3p2v0 clone of backtrace facility found in the GNU libc
> libffi-3.2.1p5      Foreign Function Interface
> libiconv-1.16p0     character set conversion library
> libmpc-0.9p2        complex numbers math library
> libomp-8.0.0p1      LLVM OpenMP runtime
> libpgmath-8.0.0.20190801 LLVM Fortran math library
> mpfr-3.1.5.2p1      library for multiple-precision floating-point
> computations
> python-2.7.16p1     interpreted object-oriented programming language
> python-3.7.4        interpreted object-oriented programming language
> quirks-3.173        exceptions to pkg_add rules
> sqlite3-3.29.0      embedded SQL implementation
> xz-5.2.4            LZMA compression and decompression tools
> 
> 
> 
> snaptest66$ sysctl |grep OpenBSD
> kern.ostype=OpenBSD
> kern.version=OpenBSD 6.6-beta (GENERIC.MP) #242: Fri Aug 23 09:06:40 MDT
> 2019
> 
> 
> 

Reply via email to