Page MenuHomeFreeBSD

Bring back lang/julia
ClosedPublic

Authored by arrowd on Nov 25 2021, 10:06 PM.

Details

Summary

This is a very minimal port of lang/julia, there is no meta port and some knobs are removed for now.
This is based on a release candidate for julia but the next release should drop soon, and i will rebase asap.
I used lang/julia10 as a starting point but have made a number of changes, this is now based on v1.7.0-rc3

UPDATE: now on v1.7.0.

Test Plan

poudriere: testport succeed on my 12.2-release 12.3-release and 13.0-release on amd64.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Sorry everyone, this is my first day with Phabricator and it is getting late and i am making mistakes.
I am going to quit here for the night and try again tomorrow.

lang/julia/Makefile
7

Isn't it possible to replace MASTER_SITES by USE_GITHUB?

34

This could be replaced by USES+=blaslapack

lang/julia/Makefile
7

Not at this moment, julia's build system will try to download its libs during the bulid stage.
By Downloading the full tar instead this is avoided.

lang/julia/Makefile
34

julia depends on openblas not blas,
did you mean USES+=blaslapack:openblas

lang/julia/Makefile
7

On second thought if i can patch julia's build system so that it wont call out during the build stage and use GH_TUPLE from ports to Download its libs in advance i can use USE_GITHUB, let me look in to this a bit further.

greg_unrelenting.technology added inline comments.
lang/julia/Makefile
7

If the /releases/ tarball is manually built to contain more vendored stuff than just the auto archive of a git tag, it is actually better to use this URL. e.g. I use this in net-im/fractal (though with gitlab). Do not switch to USE_GITHUB in that case!

tcberner added inline comments.
lang/julia/Makefile
42

^ wait what?

95

^ no need to specify the same port multiple times.

107

^ could be done more declaratively without an if, via NATIVE_MAKE_ARGS

lang/julia/pkg-plist
299

^you could think of adding 1.7 via a PLIST_SUB -- depending on how often this version is bumped, this could greatly reduce the churn on the plist.

Removed DESCR= ${.CURDIR}/../julia/pkg-descr

Change

.if ${PORT_OPTIONS:MNATIVE}
MAKE_ARGS+=	MARCH=native
.endif  # .if ${PORT_OPTIONS:MNATIVE}

to

NATIVE_MAKE_ARGS+=	MARCH=native
rizor.reardon_yahoo.com marked an inline comment as done and an inline comment as not done.Nov 28 2021, 8:04 PM
lang/julia/Makefile
102

^this should now no longer be required for the NATIVE option. You can move the variables up to the normal options block.

lang/julia/Makefile
157

^ this seems also to get removed in the DOCS-on target --- why not consolidate it?

rizor.reardon_yahoo.com set the repository for this revision to R11 FreeBSD ports repository.

Redundant suitesparse libs removed.
Unnecessary .include <bsd.port.options.mk> removed.
DOCS targets consolidated.
And pkg-plist refreshed.

Fixed man page.
Stop julia build system from making unused empty directory.
Refreshed pkg-plist

Somme portlint warnings.

lang/julia/Makefile
26

"LIB_DEPENDS" has to appear earlier.

82

use a tab (not space) after a variable name

132

contiguous blank lines (> 1 lines) found.

I just tested it in poudriere, and it builds fine, at least on amd64 / 14.0-CURRENT.

rizor.reardon_yahoo.com edited the summary of this revision. (Show Details)
rizor.reardon_yahoo.com edited the test plan for this revision. (Show Details)

Moved to version 1.7.0 and updated and fix Makefile pkg-plist and patches.

arrowd added inline comments.
lang/julia/Makefile
10

Mostly a nitpick, but how about

15

Can you put an explanation for ONLY_FOR_ARCHS in the comment? Why is it only available for amd64?

17

Another style nitpick: add another tab symbol to align 7z... line with BUILD_DEPENDS below.

113

I'm a bit confused by this check. We do have USES=blaslapack:openblas unconditionally, so it should always be available. Why perform compile-check?

rizor.reardon_yahoo.com added inline comments.
lang/julia/Makefile
113

The test is to see if openblas was built with the INTERFACE64 knob on or off and set julia to build accordingly.

I'd say this is looking fine.

This revision is now accepted and ready to land.Dec 7 2021, 6:14 AM
lang/julia/Makefile
38

Hard-coding this will break configure phase in case of different GCC_DEFAULT.

lang/julia/Makefile
38

what about GCC_VERSION?

This comment was removed by contact_shiori.com.br.
lang/julia/Makefile
38

Hard-coding this will break configure phase in case of different GCC_DEFAULT.

rizor.reardon_yahoo.com marked an inline comment as done.

Found a way to build with out hard-coded dependency on GCC10 and caught a couple of white space issues.

This revision now requires review to proceed.Dec 12 2021, 6:23 PM
lang/julia/Makefile
137

This could be put in a regular post-install target: $STRIP_CMD is only set to /usr/bin/strip when $WITH_DEVUG is not defined, else it is set to true.

Fix build with latest libgit2 with out breaking quarterly.

Remove post-install-DEBUG-off: and update post-install as suggested by thierry.

lang/julia/Makefile
127

Can' this be done without nested loop?

.for file in .codecov.yml .travis.yml appveyor.yml bors.toml .gitignore source-extracted .github
${FIND} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/julia/stdlib/v${PORTVERSION:R} -name ${file}
.endfor
lang/julia/Makefile
44

How about doing the following changes about this variable:

  1. Rename it to JULIA to bring it in sync with pkg-plist substitution.
  2. Remove PKGNAMESUFFIX from its value, as it is empty anyways. Or did you intended to use DISTVERSIONSUFFIX?
  3. Remove the julia/ part from the beginning. Right now the path to Julia stuff contains /julia/julia/ twice.
lang/julia/Makefile
60

This is probably a no-op, since you don't define USE_GPL_LIBS anywhere. This should probably be changed to just USE_GPL_LIBS=0.

lang/julia/Makefile
59

Do we need DEBUG_VARS_OFF= FORCE_ASSERTIONS=0 for this to work properly?

lang/julia/Makefile
54

Why do we need the -stdlib=libc++ flag? This is default for our Clang anyways, however some users are using GCC to compile stuff. Wouldn't this flag cause problems in such case?

Why install under ${PREFIX}/julia at all? Maybe get rid of these JULIA/INSTALLDIR altogether?

Remove -stdlib=libc++and FORCE_ASSERTIONS=${FORCE_ASSERTIONS} and JULIA/INSTALLDIR and nested loop,
update pkg-plist and set USE_GPL_LIBS to 0.

arrowd edited reviewers, added: rizor.reardon_yahoo.com; removed: arrowd.

Landed in 6b461fe1192987ac36bd1c1af3d517b8e6497fc2 , thanks everyone who contributed to this.

This revision is now accepted and ready to land.Dec 29 2021, 11:44 AM

Its been a while since I used Phabricator ._.
Sorry for the noise.