Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port Sage to OpenBSD #29677

Open
dimpase opened this issue May 12, 2020 · 11 comments
Open

port Sage to OpenBSD #29677

dimpase opened this issue May 12, 2020 · 11 comments

Comments

@dimpase
Copy link
Member

dimpase commented May 12, 2020

Targetting OpenBSD 6.6+ with clang 8 and (perhaps) flang.

Many packages work out of the box, some packages are available from OpenBSD ports.

Install flang, git, gtar, gmake, gpatch, gmp, xz, yasm, zeromq, zlib, sqlite, pkg-config, python3.7, ncurses, boost, bzip2, curl,
ecm, freetype, iconv, libffi, libgd, libpng, pcre.
(this list is not checked atm).

For sanity (some of these compatibility issues probably can be fixed, but it's time-consuming for questionable gain), create and put to the PATH symlinks
tar -> gtar, make -> gmake, patch -> gpatch. I am sticking with native shell (ksh), and it appears to work well (some bashisms are dealt with on ##29345) - Fortran (scipy) is the sticking point.

Depends on #29345

CC: @thierry-FreeBSD

Component: porting: BSD

Issue created by migration from https://trac.sagemath.org/ticket/29677

@dimpase dimpase added this to the sage-9.2 milestone May 12, 2020
@thierry-FreeBSD
Copy link

comment:1

Great! We have a similar ticket for FreeBSD: see #26249.
Some problems may be common between the two systems.

@dimpase
Copy link
Member Author

dimpase commented May 12, 2020

comment:2

The common problem is a sorry state of Fortran support. OpenBSD has a very old g95 compiler (not updated since 2013), and flang - a llvm-based Fortran frontend, which is sort of developed by NVIDIA - except that NVIDIA is also working on a complete re-write, with flang on a back-burner.

@thierry-FreeBSD
Copy link

comment:3

On FreeBSD gfortran is not that bad:

$ gfortran9 --version
GNU Fortran (FreeBSD Ports Collection) 9.3.0

We had some problems (See https://wiki.freebsd.org/libgcc%20problem?highlight=%28fortran%29 ), but they have been solved.

@dimpase
Copy link
Member Author

dimpase commented May 19, 2020

comment:4

see also #24712 - where an OpenBSD problem was mentioned with mpfr not finding symbols from compiler-rt library (which comes with clang).

@dimpase
Copy link
Member Author

dimpase commented May 19, 2020

comment:5

Also, linbox calls NTL's to_ZZ function with time(0), which is of type time_t, and there is no prototype that understands this type.

@mkoeppe
Copy link
Contributor

mkoeppe commented May 20, 2020

comment:6

Similar to a comment that I made on the FreeBSD porting ticket (#26249), also for OpenBSD I would recommend setting up testing infrastructure with our tox.ini and virtualbox (​for freebsd see https://www.freebsd.org/doc/handbook/virtualization-guest-virtualbox.html) or a similar solution.

Making it easy to set up the development environment should be one of the first steps, not an afterthought when the porting is "complete". This will enable other Sage developers to help with that platform.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Aug 13, 2020
@dimpase
Copy link
Member Author

dimpase commented Sep 3, 2020

comment:8

gfortran 8.3 on OpenBSD 6.7 can be installed by installing package g95 (sic!) which installs
egfortran - which happens to be gfortran. It seems that they mixed up g95 (an old dormant project) and gfortran (which they tagged as obsolete)... Oh well.

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 13, 2021

comment:9

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@dimpase
Copy link
Member Author

dimpase commented Apr 14, 2021

comment:10

Replying to @mkoeppe:

Similar to a comment that I made on the FreeBSD porting ticket (#26249), also for OpenBSD I would recommend setting up testing infrastructure with our tox.ini and virtualbox (​for freebsd see https://www.freebsd.org/doc/handbook/virtualization-guest-virtualbox.html) or a similar solution.

Making it easy to set up the development environment should be one of the first steps, not an afterthought when the porting is "complete". This will enable other Sage developers to help with that platform.

one way to test on openbsd and freebsd would be to use
https://man.sr.ht/builds.sr.ht/compatibility.md

of course it's yet another slightly different yaml:
https://man.sr.ht/builds.sr.ht/#how-jobs-are-submitted

(although it does not look crazy, and it's well-supported)

@mkoeppe mkoeppe removed this from the sage-9.4 milestone Jul 11, 2021
@dimpase
Copy link
Member Author

dimpase commented Jul 12, 2021

comment:12

the latest snag is Numpy: numpy/numpy#19437
(while Singular more or less works...)

@dimpase
Copy link
Member Author

dimpase commented Jun 25, 2024

Singular is the current culprit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants