basilisk MAC Book pro M4

41 views
Skip to first unread message

Thomas Frisch

unread,
Nov 25, 2025, 11:07:56 AM (3 days ago) Nov 25
to basil...@googlegroups.com, Thomas Frisch

Dear All, 

Did anyone installed basilisk on a mac book pro M4. I have  problems when I  do the make


curl https://basilisk.fr/basilisk/basilisk.tar.gz >> basilisk.tar.gz

tar xzf basilisk.tar.gz

cd  basilisk/src 

ln -s config.osx config

make


sk/src/grid/memindex/virtual.h: In function 'mem_assign':

/Users/thomasfrisch/basilisk/src/grid/memindex/virtual.h:103:79: error: 'MAP_ANONYMOUS' undeclared (first use in this function)

  103 |     m->b = mymap (len);

      |                                                                               ^            

/Users/thomasfrisch/basilisk/src/grid/memindex/virtual.h:103:79: note: each undeclared identifier is reported only once for each function it appears in

/Users/thomasfrisch/basilisk/src/grid/memindex/virtual.h: In function 'mem_free1d':

/Users/thomasfrisch/basilisk/src/grid/memindex/virtual.h:135:7: error: implicit declaration of function 'madvise'; did you mean 'raise'? [-Wimplicit-function-declaration]

  135 |   if (madvise (start, 4096, MADV_DONTNEED))

      |       ^~~~~~~

      |       raise

/Users/thomasfrisch/basilisk/src/grid/memindex/virtual.h:135:29: error: 'MADV_DONTNEED' undeclared (first use in this function); did you mean 'POSIX_MADV_DONTNEED'?

  135 |   if (madvise (start, 4096, MADV_DONTNEED))

      |                             ^~~~~~~~~~~~~

      |                             POSIX_MADV_DONTNEED

make: *** [bview2D] Error 





Thank you, 
Best Regards,
Thomas Frisch 

Edoardo Cipriano

unread,
Nov 25, 2025, 3:24:28 PM (3 days ago) Nov 25
to basilisk-fr
Hi Thomas,

You should be able to overcome that problem adding -D_DARWIN_C_SOURCE in the config file, see:


However, I am still investigating if that is the correct way to resolve the problem.

In the file:

/Library/Developer/CommandLineTools/SDKs/MacOSX15.5.sdk/usr/include/sys/mman.h

those functions/macros are clearly defined only if _POSIX_C_SOURCE is NOT defined and if _DARWIN_C_SOURCE is defined:

265 #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)

266 int     madvise(void *, size_t, int);

267 int     mincore(const void *, size_t, char *);

268 int     minherit(void *, size_t, int);

269 #endif


Best,
Edoardo

Edoardo Cipriano

unread,
Nov 25, 2025, 3:33:24 PM (3 days ago) Nov 25
to basilisk-fr
Correction: those functions are defined if _POSIX_C_SOURCE is NOT defined OR if _DARWIN_C_SOURCE is defined.

So defining _DARWIN_C_SOURCE is a workaround but I'm not sure why it is necessary.
Reply all
Reply to author
Forward
0 new messages