How to compile math/librsb with poudriere ?

Ignored ports,
Search:
#PackageOriginSkippedReason
1librsb-1.2.0.10math/librsb2has to be built manually: Optimizes for the local machine

my make.conf
Code:
DISABLE_LICENSES=yes
MAKE_JOBS_UNSAFE=yes
BATCH=yes
CPUTYPE?=core-avx-i
MAKE_JOBS_NUMBER=20
CCACHE_DIR=/ccache
WITH_CCACHE_BUILD=yes
WITHOUT_MANCOMPRESS=YES
DEFAULT_VERSIONS+=ssl=openssl
DEFAULT_VERSIONS+=llvm=12
DEFAULT_VERSIONS+=gcc=10
DEFAULT_VERSIONS+=lua=5.4
DEFAULT_VERSIONS+=lua5=5.4
DEFAULT_VERSIONS+=perl=5.34
DEFAULT_VERSIONS+=perl5=5.34
DEFAULT_VERSIONS+=python=3.8
DEFAULT_VERSIONS+=python3=3.8
DEFAULT_VERSIONS+=ruby=2.7
DEFAULT_VERSIONS+=ruby2=2.7
DEFAULT_VERSIONS+=pgsql=13
DEFAULT_VERSIONS+=mysql=10.5m
DEFAULT_VERSIONS+=php=8.0
DEFAULT_VERSIONS+=tcltk=8.6
 
Uncomment this setting in /usr/local/etc/poudriere.conf:
Code:
# By default poudriere sets PACKAGE_BUILDING
# To disable it:
# NO_PACKAGE_BUILDING=yes
 
This is my poudriere.conf, i don't have that setting,
Code:
a:root: /pou #cat poudriere.conf 
FREEBSD_HOST=ftp://ftp.nl.freebsd.org
SVN_HOST=svn.FreeBSD.org
ZPOOL=ZT
ZROOTFS=/jails/a/apou
BASEFS=/
POUDRIERE_DATA=/data
CCACHE_DIR=/ccache
RESOLV_CONF=/etc/resolv.conf
DISTFILES_CACHE=/usr/ports/distfiles
URL_BASE="http://127.0.0.1/"
HTML_TRACK_REMAINING=yes
HTML_TYPE="hosted"
WRKDIR_ARCHIVE_FORMAT=tar
USE_TMPFS=no
CHECK_CHANGED_DEPS=yes
CHECK_CHANGED_OPTIONS=verbose
COMMIT_PACKAGES_ON_FAILURE=no
NOLINUX=yes
TIMESTAMP_LOGS=yes
USE_COLORS=yes
USE_PORTLINT=no
PARALLEL_JOBS=5
PREPARE_PARALLEL_JOBS=16
ALLOW_MAKE_JOBS=yes
COMMIT_PACKAGES_ON_FAILURE=yes
 
Then add it? 🤷‍♂️

And btw, be sure to understand the consequence. You will get a package optimized for the machine it is built on. It might not work at all on a machine with a different CPU.
 
For a long time math/openblas had a similar problem. But that has a DYNAMIC option you can switch on. Unfortunately math/librsb doesn't seem to have that. So you can end up with a package that simply doesn't work on another system that has a different CPU type than your build machine.
 
But that has a DYNAMIC option you can switch on. Unfortunately math/librsb doesn't seem to have that.
Being curious whether something like this could be added more or less easily, I noticed there seems to be something like a re-rolled distfile as well? Every SF mirror results in size mismatch: expected 2396127, actual 2396145.

Guess I'll have to recreate distinfo first :rolleyes:

Ok, did that and now I'm confused, ./configure generates the following output:
Code:
=============== Build Programs and Flags ===============================
(you can override these at build time; e.g.: 'make CC=cc')
        CC                     : cc
        CFLAGS                 : -g -O2 -fopenmp -std=c99

Is it lying to me? 🤔 or how does that "optimize for the local machine"?
 
Maybe through some #ifdef checks on flags in the code itself?
But the code can't modify compiler flags.

Anyways, found the culprit: configure.ac contains a LOT of weird magic to set -march and a few other optimization flags if the compiler used is GCC, and guess what, the port has USE_GCC=yes.

Ok, funny, this whole magic doesn't seem to work here either 😏:
Code:
cat: /proc/cpuinfo: No such file or directory
configure: Guessing the C compiler is gcc.
[...]
=============== Build Programs and Flags ===============================
(you can override these at build time; e.g.: 'make CC=cc')
    CC                     : gcc10
    CFLAGS                 : -O2 -pipe  -fPIC -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-strict-aliasing  -fopenmp -std=c99

Looks like pretty normal CFLAGS handling in ports. This leaves questions:
  • Does it even make sense to assume it would ever build "for the local machine"? /proc/cpuinfo is Linux stuff…
  • Does it really need GCC? Ok, it needs fortran and therefore depends on GCC anyways, so that's a bit pointless...
 
Back
Top