building julia 0.5.0 on FreeBSD 11

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

building julia 0.5.0 on FreeBSD 11

Kostas Oikonomou
Hi, I'm following the instructions in the README, trying to build 0.5.0 from source on an amd64 machine.  

However, I'm stuck at errors  in the OpenBlas build:


blas_server.c:569:16: error: variable has incomplete type 'struct rlimit'
        struct rlimit rlim;
                      ^
blas_server.c:569:9: note: forward declaration of 'struct rlimit'
        struct rlimit rlim;
               ^
blas_server.c:578:17: warning: implicit declaration of function 'raise' is invalid in C99
      [-Wimplicit-function-declaration]
        if(0 != raise(SIGINT)) {
                ^
blas_server.c:578:23: error: use of undeclared identifier 'SIGINT'
        if(0 != raise(SIGINT)) {
                      ^
1 warning and 2 errors generated.
gmake[3]: *** [Makefile:101: blas_server.o] Error 1


I also tried using FreeBSD's OpenBlas port, but that apparently creates a conflict between gcc 4.8.4 and the recommended gcc6.

Here is my Make.user file:

# libunwind needs a small patch to its tests to compile.
FC=gfortran6
# gfortran can't link binaries:
FFLAGS=-Wl,-rpath,/usr/local/lib/gcc6
# System libraries installed by pkg are not on the compiler path by default:
LDFLAGS=/usr/local/lib
CPPFLAGS=/usr/local/include
# Problems with OpenBLAS
OPENBLAS_TARGET_ARCH=BARCELONA
OPENBLAS_DYNAMIC_ARCH=0
# Installation
prefix=/opt/julia

Thanks for any help.

Kostas
Reply | Threaded
Open this post in threaded view
|

Re: building julia 0.5.0 on FreeBSD 11

Isaiah Norton
Just guessing here from some quick poking around: try adding `#include <sys/types.h>` to that file (`OPENBLAS_SRC/driver/others/blas_server.c`).

On Sat, Oct 29, 2016 at 4:50 PM, Kostas Oikonomou <[hidden email]> wrote:
Hi, I'm following the instructions in the README, trying to build 0.5.0 from source on an amd64 machine.  

However, I'm stuck at errors  in the OpenBlas build:


blas_server.c:569:16: error: variable has incomplete type 'struct rlimit'
        struct rlimit rlim;
                      ^
blas_server.c:569:9: note: forward declaration of 'struct rlimit'
        struct rlimit rlim;
               ^
blas_server.c:578:17: warning: implicit declaration of function 'raise' is invalid in C99
      [-Wimplicit-function-declaration]
        if(0 != raise(SIGINT)) {
                ^
blas_server.c:578:23: error: use of undeclared identifier 'SIGINT'
        if(0 != raise(SIGINT)) {
                      ^
1 warning and 2 errors generated.
gmake[3]: *** [Makefile:101: blas_server.o] Error 1


I also tried using FreeBSD's OpenBlas port, but that apparently creates a conflict between gcc 4.8.4 and the recommended gcc6.

Here is my Make.user file:

# libunwind needs a small patch to its tests to compile.
FC=gfortran6
# gfortran can't link binaries:
FFLAGS=-Wl,-rpath,/usr/local/lib/gcc6
# System libraries installed by pkg are not on the compiler path by default:
LDFLAGS=/usr/local/lib
CPPFLAGS=/usr/local/include
# Problems with OpenBLAS
OPENBLAS_TARGET_ARCH=BARCELONA
OPENBLAS_DYNAMIC_ARCH=0
# Installation
prefix=/opt/julia

Thanks for any help.

Kostas

Reply | Threaded
Open this post in threaded view
|

Re: building julia 0.5.0 on FreeBSD 11

Kostas Oikonomou
Thanks, I found an entire set of patches.

On Sunday, October 30, 2016 at 10:28:40 PM UTC-4, Isaiah wrote:
Just guessing here from some quick poking around: try adding `#include <sys/types.h>` to that file (`OPENBLAS_SRC/driver/others/blas_server.c`).

On Sat, Oct 29, 2016 at 4:50 PM, Kostas Oikonomou <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="InudnjYhAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">kostas.oi...@...> wrote:
Hi, I'm following the instructions in the README, trying to build 0.5.0 from source on an amd64 machine.  

However, I'm stuck at errors  in the OpenBlas build:


blas_server.c:569:16: error: variable has incomplete type 'struct rlimit'
        struct rlimit rlim;
                      ^
blas_server.c:569:9: note: forward declaration of 'struct rlimit'
        struct rlimit rlim;
               ^
blas_server.c:578:17: warning: implicit declaration of function 'raise' is invalid in C99
      [-Wimplicit-function-declaration]
        if(0 != raise(SIGINT)) {
                ^
blas_server.c:578:23: error: use of undeclared identifier 'SIGINT'
        if(0 != raise(SIGINT)) {
                      ^
1 warning and 2 errors generated.
gmake[3]: *** [Makefile:101: blas_server.o] Error 1


I also tried using FreeBSD's OpenBlas port, but that apparently creates a conflict between gcc 4.8.4 and the recommended gcc6.

Here is my Make.user file:

# libunwind needs a small patch to its tests to compile.
FC=gfortran6
# gfortran can't link binaries:
FFLAGS=-Wl,-rpath,/usr/local/lib/gcc6
# System libraries installed by pkg are not on the compiler path by default:
LDFLAGS=/usr/local/lib
CPPFLAGS=/usr/local/include
# Problems with OpenBLAS
OPENBLAS_TARGET_ARCH=BARCELONA
OPENBLAS_DYNAMIC_ARCH=0
# Installation
prefix=/opt/julia

Thanks for any help.

Kostas

Reply | Threaded
Open this post in threaded view
|

Re: building julia 0.5.0 on FreeBSD 11

Jeffrey Sarnoff
Kostas,

Please post the location of those patches for others' reference.

Thanks

On Wednesday, November 2, 2016 at 6:29:40 PM UTC-4, Kostas Oikonomou wrote:
Thanks, I found an entire set of patches.

On Sunday, October 30, 2016 at 10:28:40 PM UTC-4, Isaiah wrote:
Just guessing here from some quick poking around: try adding `#include <sys/types.h>` to that file (`OPENBLAS_SRC/driver/others/blas_server.c`).

On Sat, Oct 29, 2016 at 4:50 PM, Kostas Oikonomou <[hidden email]> wrote:
Hi, I'm following the instructions in the README, trying to build 0.5.0 from source on an amd64 machine.  

However, I'm stuck at errors  in the OpenBlas build:


blas_server.c:569:16: error: variable has incomplete type 'struct rlimit'
        struct rlimit rlim;
                      ^
blas_server.c:569:9: note: forward declaration of 'struct rlimit'
        struct rlimit rlim;
               ^
blas_server.c:578:17: warning: implicit declaration of function 'raise' is invalid in C99
      [-Wimplicit-function-declaration]
        if(0 != raise(SIGINT)) {
                ^
blas_server.c:578:23: error: use of undeclared identifier 'SIGINT'
        if(0 != raise(SIGINT)) {
                      ^
1 warning and 2 errors generated.
gmake[3]: *** [Makefile:101: blas_server.o] Error 1


I also tried using FreeBSD's OpenBlas port, but that apparently creates a conflict between gcc 4.8.4 and the recommended gcc6.

Here is my Make.user file:

# libunwind needs a small patch to its tests to compile.
FC=gfortran6
# gfortran can't link binaries:
FFLAGS=-Wl,-rpath,/usr/local/lib/gcc6
# System libraries installed by pkg are not on the compiler path by default:
LDFLAGS=/usr/local/lib
CPPFLAGS=/usr/local/include
# Problems with OpenBLAS
OPENBLAS_TARGET_ARCH=BARCELONA
OPENBLAS_DYNAMIC_ARCH=0
# Installation
prefix=/opt/julia

Thanks for any help.

Kostas

Reply | Threaded
Open this post in threaded view
|

Re: building julia 0.5.0 on FreeBSD 11

Kostas Oikonomou
The patches for OpenBlas are included in the FreeBSD port of openblas, specifically they may be found in

/usr/ports/math/openblas/files

So the general procedure I followed for building the dependencies (that's the only place where there were problems) is: every time a dependency fails to build, find the corresponding port in the FreeBSD ports tree, and apply its patches.

On Wednesday, November 2, 2016 at 9:38:57 PM UTC-4, Jeffrey Sarnoff wrote:
Kostas,

Please post the location of those patches for others' reference.

Thanks