[esp-r] Re: Compiling on MacOS 26.5+

achim.geissler achim.geissler at acatalepsy.ch
Sun Aug 9 15:02:08 BST 2026


Hi Gian Luca,

your fix works fine for V13.3.17 on MacOS 26.6 (M2) using (brew installed) gcc-16 which seems to correspond to MacOSX26.sdk (-std=gnu17 does not cause an issue). X is fired up as expected (I haven’t run any test on actual functionality, yet, though).

On MacOS, I need some additional changes to ‘Install' due to the non-editable /usr/ directory on macs (line-numbers refer to modified Install), given here for anybody interested (I use brew for any “Linux” packages):

Approx. line 340 ff:
   else
    xml_libs_found="yes"
    if [ "$machine" = "arm64" ]; then
        LIBXML2_INCLUDE="-I/opt/homebrew/opt/libxml2/include/libxml2 -I/opt/homebrew/opt/libxslt/include/libxslt"
    else
        LIBXML2_INCLUDE="-I/usr/include -I/usr/include/libxml2 -I/usr/local/include/libxml2 -I/usr/include/libxslt -I/local/include/libxslt"
    fi

Approx. line 804 ff:
case $platform in
  mac)
      localinclude="-I/opt/homebrew/include"
      ;;
  *)  localinclude="-I/usr/local/include" ;;
esac

LOCAL_INCLUDES="-I../include -I../shocc ${localinclude} -I../cetc/h3kreports"

Sadly it seems that between V.17 and V.18 changes in the X code break the X-connection for MacOS. During compile, for V.18 the header file mntext.h and others are missing. I found these in package 'brew install emscripten’ (compiler toolchain to WebAssembly) which makes 'mntext.h’, 'bits/alltypes.h' and 'bits/dirent.h’ available. No idea what this is actually necessary for in ESP-r.

For what its worth.

Best
Achim


> On 8 Aug 2026, at 23:18, Gian Luca Brunetti <gianluca.brunetti at polimi.it> wrote:
> 
> Hi Achim,
> I have just encountered a different issue with 13.3.18 on a current Ubuntu system, so I thought I would mention it here in case it is useful to others.
> In my case, the installation stopped while building the X11 part of ESP-r, in esru_x.c. With a recent GCC, some old-style C declarations, for example
> extern gnwkquery_();
> are interpreted differently, which led to errors such as “too many arguments to function”, together with a conflicting declaration of getenv().
> I was able to get past this by compiling the C code using GNU C17 semantics, adding
> -std=gnu17
> to the CFLAGS used by the installer.
> The patch I used was:
> sed -i '/GNU).*CFLAGS=/ s|";;| -std=gnu17 -Wno-error=implicit-int -Wno-error=implicit-function-declaration";;|' Install
> This is a different issue from the update_notes.txt problem you describe, but the workaround might still be worth sharing.
> For completeness: I used ChatGPT to formulate the workaround.
> Best
> Gian Luca
> 
> 
> Gian Luca Brunetti
> Associate Professor
> Arch. PhD
> Politecnico di Milano
> DAStU - Dipartimento di Architettura e Studi Urbani / Department of Architecture and Urban Studies
> via Bonardi 3, edificio 12 / building 12
> 20133 Milano
> tel. (+39) 02 2399 5750
> cell. (+39) 3358040808
> email: gianluca.brunetti at polimi.it <mailto:gianluca.brunetti at polimi.it>
> From: esp-r-bounces at lists.strath.ac.uk <mailto:esp-r-bounces at lists.strath.ac.uk> <esp-r-bounces at lists.strath.ac.uk <mailto:esp-r-bounces at lists.strath.ac.uk>> on behalf of achim.geissler <achim.geissler at acatalepsy.ch <mailto:achim.geissler at acatalepsy.ch>>
> Sent: Monday, August 3, 2026 9:08 AM
> To: esp-r at lists.strath.ac.uk <mailto:esp-r at lists.strath.ac.uk> <esp-r at lists.strath.ac.uk <mailto:esp-r at lists.strath.ac.uk>>
> Subject: [esp-r] Compiling on MacOS 26.5+
>  
> Hi all,
> 
> after some time, I wanted to update my ESP-r version on my M2 Mac w/ MacOS 26.5 (soon .6) to the current latest, 13.3.18 from May 2025.
> 
> Compiling was possible after quite a struggle, however, there seems to be a problem with the “update_notes.txt” which is downloaded at startup to check if the most recent version is installed. As far as I could see, an (MacOS) “EOF” or similar is inserted prior to the 13.3.18 changes listing and this leads to an error "EMENU: EOF detected, error in input command.” which itself possibly makes firing up of X broken.
> 
> Who - currently - is managing the ESP-r code? I would be interested in getting the 13.3.17 archive (my latest successful installation was 13.3.16) to make sure there is no gap in my source tree.
> 
> Also, it would be nice if somebody at ESRU could check the current “update_notes.txt” and make sure no undesired characters inadvertently made their way into it.
> 
> Thanks.
> Best
> Achim
> 
> achim.geissler at acatalepsy.ch <mailto:achim.geissler at acatalepsy.ch>

achim.geissler at acatalepsy.ch



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.strath.ac.uk/archives/esp-r/attachments/20260809/aeafd925/attachment-0001.html 


More information about the esp-r mailing list