Porting pythonocc-core

I am trying to port pythonocc-core.

I created a jail with freebsd-14.3-RELEASE for this.
The output of make build brings following error:
Code:
14_3_release] Installing gettext-tools-0.23.1_1...
===>   p5-Locale-gettext-1.07 depends on executable: msgfmt - found
===>   Returning to build of p5-Locale-gettext-1.07
===>   p5-Locale-gettext-1.07 depends on package: perl5>=5.40.r<5.41 - found
===>   p5-Locale-gettext-1.07 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for p5-Locale-gettext-1.07
env: /usr/local/bin/perl5.40.3: No such file or directory
*** Error code 127

Stop.
make[15]: stopped in /usr/ports/devel/p5-Locale-gettext
*** Error code 1

Stop.
make[14]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make[13]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make[12]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[11]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[10]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[9]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[8]: stopped in /usr/ports/devel/bison
*** Error code 1

Stop.
make[7]: stopped in /usr/ports/devel/bison
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/graphics/graphviz
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/graphics/graphviz
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/devel/doxygen
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/doxygen
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/rapidjson
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/rapidjson
*** Error code 1

Stop.
make: stopped in /usr/ports/cad/pythonocc-core
[root@14_3_release /usr/ports/cad/pythonocc-core]#

Code:
[root@14_3_release /usr/ports/cad/pythonocc-core]# ls /usr/local/bin/perl*
/usr/local/bin/perl*        /usr/local/bin/perlbug*        /usr/local/bin/perldoc5.42.0*  /usr/local/bin/perlthanks*
/usr/local/bin/perl5.40.2@  /usr/local/bin/perlbug5.42.0*  /usr/local/bin/perlivp*        /usr/local/bin/perlthanks5.42.0*
/usr/local/bin/perl5.42.0*  /usr/local/bin/perldoc*        /usr/local/bin/perlivp5.42.0*

The installed Perl 5.40 version is 5.40.2

Having a look at FreshPorts show:
freshport.png


I am a bit surpised, 5.40.2 exists as package and is installed with pkg install git.
What could be a workaround for this?
 
The installed Perl 5.40 version is 5.40.2
No, it's 5.42.0, /usr/local/bin/perl5.40.2@ is a symlink and probably a dangling one now. Look at ls -l /usr/local/bin/perl*

Ah, I think I see where you went wrong. You've mixed quarterly packages (where Perl 5.40 is the default) with a recent (aka latest) ports tree (where 5.42 is the default).

 
I installed perl 5.42 after (with pkg install) to try to solve the problem.

Code:
[root@14_3_release /usr/ports/cad/pythonocc-core]# ls -l /usr/local/bin/perl*
.rwxr-xr-x 7.2k root wheel  9 Aug 03:10 /usr/local/bin/perl*
lrwxr-xr-x    - root wheel  9 Aug 03:10 /usr/local/bin/perl5.40.2 -> perl*
.rwxr-xr-x 7.2k root wheel 11 Aug 05:27 /usr/local/bin/perl5.42.0*
.rwxr-xr-x  46k root wheel  9 Aug 03:09 /usr/local/bin/perlbug*
.rwxr-xr-x  46k root wheel 11 Aug 05:27 /usr/local/bin/perlbug5.42.0*
.rwxr-xr-x  274 root wheel  9 Aug 03:09 /usr/local/bin/perldoc*
.rwxr-xr-x  286 root wheel 11 Aug 05:27 /usr/local/bin/perldoc5.42.0*
.rwxr-xr-x  11k root wheel  9 Aug 03:09 /usr/local/bin/perlivp*
.rwxr-xr-x  11k root wheel 11 Aug 05:27 /usr/local/bin/perlivp5.42.0*
.rwxr-xr-x  46k root wheel  9 Aug 03:09 /usr/local/bin/perlthanks*
.rwxr-xr-x  46k root wheel 11 Aug 05:27 /usr/local/bin/perlthanks5.42.0*
 
Looking at it again, the confusion is probably caused by the port being updated to 5.40.3 but the packages haven't been built yet (or at least not distributed). Packages will always lag a little behind the ports tree as it takes time to build and distribute.

Last quarterly build started yesterday, finished 25 hours later, it included a package for Perl 5.40.3: https://pkg-status.freebsd.org/beefy20/build.html?mastername=142amd64-quarterly&build=5e9ac41ee645

In case you don't have IPv6:
Screenshot 2025-08-20 184332.png

Looks like those haven't been pushed to the package mirrors yet, or is in the process of doing so.
 
Last quarterly build started yesterday, finished 25 hours later, it included a package for Perl 5.40.3: https://pkg-status.freebsd.org/beefy20/build.html?mastername=142amd64-quarterly&build=5e9ac41ee645
This solved the original problem of Perl5.40, and also maybe not needed anymore. (Perl 5.42 is used)

I now run in some new troubles, (libxslt deprecated for example) or some recursion problems between gobject-introspection-bootstrap and glib (===> glib-2.84.1_3,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found)

Before I post unneccessary details here, I think to upgrade the host to CURRENT, actually it is a 14.3 STABLE, and it could brings me some more flexibility.

I had some success last week, I could:
-compile the source by installing the missing components with pkg install (in the host 14.3 stable).

And after this (in the jail 14.3-RELEASE):
-create the Makefile
-create the patch
-make fetch
-make extract
.make patch
-make build
-make stage

Now it fails to make build, and I must say I feel me a little bit lost...

Anyway, the previous Makefile had an big error in LIB_DEPENDS, another one in attachment which does not mean this one is correct.

I also do not use poudriere for now, I only use portlint.
My question now is would poudriere help at the stage of making the port?
 

Attachments

poudriere-testport(8) does a lot of automated additional checking, the result is very informative.
Yes, indeed, and I also make some progress.


root@jupiter:~ # poudriere jails -l
JAILNAME VERSION ARCH METHOD TIMESTAMP PATH
143Ramd64 14.3-RELEASE-p2 amd64 http 2025-08-25 19:27:34 /usr/local/poudriere/jails/143Ramd64
15amd64 15.0-PRERELEASE 1500063 2765d8d5b amd64 git+https 2025-08-25 17:44:03 /usr/local/poudriere/jails/15amd64



root@jupiter:~ # poudriere ports -l
PORTSTREE METHOD TIMESTAMP PATH
default git+https 2025-08-25 20:12:48 /usr/local/poudriere/ports/default
development null 2025-08-25 20:02:25 /home/phil/ports
quaterly git+https 2025-08-12 21:08:14 /usr/local/poudriere/ports/quaterly


I started with (as root):

poudriere testport -j 143Ramd64 -p development -o cad/pythonocc-core


Everything compiled, at the end I have following error:
(/usr/local/poudriere/data/logs/bulk/143Ramd64-development-devset/2025-08-26_16h23m34s/logs/pythonocc-core-7.9.0.log)


671 ===> Returning to build of pythonocc-core-7.9.0
672 ===========================================================================
673 =======================<phase: lib-depends >============================
674 ===== env: DEVELOPER_MODE=yes USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
675 ===========================================================================
676 =>> Recording filesystem state for prebuild... done
677 =======================<phase: configure >============================
678 ===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
679 ===> pythonocc-core-7.9.0 depends on executable: cmake - found
680 ===> pythonocc-core-7.9.0 depends on file: /usr/local/include/rapidjson/reader.h - found
681 ===> pythonocc-core-7.9.0 depends on file: /usr/local/bin/python3.11 - found
682 ===> pythonocc-core-7.9.0 depends on file: /usr/local/lib/python3.11/site-packages/numpy/__init__.py - found
683 ===> pythonocc-core-7.9.0 depends on executable: swig - found
684 ===> Installing existing package /packages/All/opencascade-7.9.1_1.pkg
685 pkg-static: Insufficient privileges to add packages
686 *** Error code 1
687
688 Stop.
689 make: stopped in /usr/ports/cad/pythonocc-core
690 build of cad/pythonocc-core | pythonocc-core-7.9.0 ended at Tue Aug 26 23:16:07 CEST 2025
691 build time: 00:00:26
692 !!! build failure encountered !!!



root@jupiter:/usr/local/poudriere/data/packages/143Ramd64-development-devset/.real_1756242941/All # ls -l opencascade-7.9.1_1.pkg
.rw-r--r-- 37M nobody wheel 26 Aug 23:15 opencascade-7.9.1_1.pkg


Does someone have an idea?
 
Back
Top