building julia 0.5.0 on FreeBSD 11

230 views
Skip to first unread message

Kostas Oikonomou

unread,
Oct 30, 2016, 12:31:01 PM10/30/16
to julia-users
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

Isaiah Norton

unread,
Oct 30, 2016, 10:28:40 PM10/30/16
to julia...@googlegroups.com
Just guessing here from some quick poking around: try adding `#include <sys/types.h>` to that file (`OPENBLAS_SRC/driver/others/blas_server.c`).

Kostas Oikonomou

unread,
Nov 2, 2016, 6:29:40 PM11/2/16
to julia-users
Thanks, I found an entire set of patches.

Jeffrey Sarnoff

unread,
Nov 2, 2016, 9:38:57 PM11/2/16
to julia-users
Kostas,

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

Thanks

Kostas Oikonomou

unread,
Nov 4, 2016, 6:28:07 PM11/4/16
to julia-users
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.

Reply all
Reply to author
Forward
0 new messages