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