Julia language on DragonflyBSD

Sayed Mohammad Badiezadegan mbzadegan at gmail.com
Tue Apr 8 07:28:25 PDT 2025


Yes, I got the PATH_MAX error same as you!

Should I uncomment "#if defined(_OS_FREEBSD_) || defined(_OS_OPENBSD_)" and
the lines after in this section in* src/libblastrampoline_internal.h*

Thank you,


On Tue, Apr 8, 2025 at 7:13 AM Michael Neumann <mneumann at ntecs.de> wrote:

> On Tue, Apr 08, 2025 at 06:42:17AM -0700, Sayed Mohammad Badiezadegan
> wrote:
> > Thank you Michael.
> >
> > I did your advice, and now I have the attached screenshot Warnings &
> Errors.
> >
> > Should I change any other variables? or...
>
> The problem now is in deps/blastrampoline.mk. This fetches and
> compiles https://github.com/JuliaLinearAlgebra/libblastrampoline.git
> as you can see in line 5 of deps/blastrampoline.mk.
>
> What I do:
>
>         git clone
> https://github.com/JuliaLinearAlgebra/libblastrampoline.git
>         cd libblastrampoline/src
>         gmake
>
> This gives me the following error:
>
>         libblastrampoline/src % gmake
>         cc -o build/libblastrampoline.o -g -O2 -std=gnu99 -fPIC
> -DLIBRARY_EXPORTS -D_GNU_SOURCE -DARCH_x86_64 -DF2C_AUTODETECTION
> -DCBLAS_DIVERGENCE_AUTODETECTION -DCOMPLEX_RETSTYLE_AUTODETECTION -c
> libblastrampoline.c
>         libblastrampoline.c: In function 'init':
>         libblastrampoline.c:514:23: error: 'PATH_MAX' undeclared (first
> use in this function); did you mean 'RAND_MAX'?
>                  char curr_lib[PATH_MAX];
>                                ^~~~~~~~
>                                RAND_MAX
>         libblastrampoline.c:514:23: note: each undeclared identifier is
> reported only once for each function it appears in
>
>
> Look at src/libblastrampoline_internal.h. There you'll find
>
>         #if defined(_OS_FREEBSD_) || defined(_OS_OPENBSD_)
>         ...
>
> You need to patch the following files:
>
>         diff --git a/src/libblastrampoline.h b/src/libblastrampoline.h
>         index 250e82b..1ca4739 100644
>         --- a/src/libblastrampoline.h
>         +++ b/src/libblastrampoline.h
>         @@ -7,6 +7,8 @@ extern "C" {
>          // This shamelessly stolen from
> https://github.com/JuliaLang/julia/blob/master/src/support/platform.h
>          #if defined(__FreeBSD__)
>          #define _OS_FREEBSD_
>         +#elif defined(__DragonFly__)
>         +#define _OS_DRAGONFLY_
>          #elif defined(__OpenBSD__)
>          #define _OS_OPENBSD_
>          #elif defined(__linux__)
>         diff --git a/src/libblastrampoline_internal.h
> b/src/libblastrampoline_internal.h
>         index e6ca762..a431ede 100644
>         --- a/src/libblastrampoline_internal.h
>         +++ b/src/libblastrampoline_internal.h
>         @@ -25,7 +25,7 @@
>          #include <dlfcn.h>
>          #endif
>
>         -#if defined(_OS_FREEBSD_) || defined(_OS_OPENBSD_)
>         +#if defined(_OS_FREEBSD_) || defined(_OS_OPENBSD_) ||
> defined(_OS_DRAGONFLY_)
>          #include <stddef.h>
>
> Then it compiles fine. Feel free to submit a Pull request (PR) to
> JuliaLinearAlgebra/libblastrampoline.git with above changes.
>
> Regards,
>
>   Michael
>
> >
> > Thank you so much.
> >
> > On Tue, Apr 8, 2025 at 2:32 AM Michael Neumann <mneumann at ntecs.de>
> wrote:
> >
> > > On Mon, Apr 07, 2025 at 06:10:59PM -0700, Sayed Mohammad Badiezadegan
> > > wrote:
> > > > Hi everybody,
> > > >
> > > > I tried to install Julia on my DragonflyBSD, which was installed by
> the
> > > > DragonflyBSD 2025-04-07 snapshot.
> > > >
> > > > I installed GCC13, GIT, OpenBLAS, and SuiteSparse, but I still got
> this
> > > > error when I run the following:
> > > >
> > > > *root@:/julia # gmake -j 4/bin/sh: {python|python3|python2} not
> found:
> > > not
> > > > found/bin/sh: {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > >
> > > Do you have python installed?
> > >
> > >
> > >
> https://github.com/JuliaLang/julia/blob/ec424d47ff8414a3666dce40d5977aabb509da0f/Make.inc#L167
> > >
> > > Try "which python" on your system. Or "which python3". This should
> help:
> > >
> > >         sudo pkg ins python3
> > >
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not found/bin/sh:
> > > > {python|python3|python2} not found: not foundgmake: not: No such
> file or
> > > > directory/bin/sh: not: not found/julia/Make.inc:1375:
> > > normalize_triplet.py
> > > > appears to be non-functional (used python interpreter "not found"),
> so
> > > > BinaryBuilder disabled/bin/sh: not: not found/julia/Make.inc:1445:
> ***
> > > > "Attempting to build OpenBLAS or SuiteSparse without a functioning
> > > fortran
> > > > compiler!".  Stop.root@:/julia #*
> > >
> > > Also, quite often, on Linux systems "/bin/sh" is actually bash. Try
> > > setting environment variable "export SHELL=/usr/local/bin/bash" before
> > > running gmake, and of course install bash (sudo pkg ins bash).
> > >
> > > Also try looking for files starting with "#!/bin/sh" so called shebang.
> > > If those scripts expect "bash" you need to change it to
> > > "#!/usr/local/bin/bash".
> > >
> > > Hope this helps to make more progress.
> > >
> > > Regards,
> > >
> > >   Michael
> > >
> > > >
> > > > What should I do? Thank you.
> > >
> > > --
> > > Michael Neumann
> > > NTECS Consulting
> > > www.ntecs.de
> > >
>
>
>
> --
> Michael Neumann
> NTECS Consulting
> www.ntecs.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20250408/5d85370d/attachment.htm>


More information about the Users mailing list