[xcrysden] Error in compiling XCrysden source package for MacOS

Ikutaro Hamada ikutaro.hamada at gmail.com
Sat Sep 24 06:42:37 CEST 2022


Dear Tevin and Tone,

Very recently, I succeeded in building xcrysden 1.6.2 on macos Monterey
using ``Make.sys`` as attached. Here's a minimum list of my environment:

- MacBook Pro (13 inch M1 2020)
- Homebew 3.6.2 (Homebrew/homebrew-core (git revision a00122a7143; last
commit 2022-09-21))
- gcc (installed via ``brew install gcc``)

Rename the attached ``Make.sys.txt`` ``Make.sys`` in the root directory and
execute ``make all``.

HTH

Best,
Ikutaro

---
Ikutaro Hamada
Department of Precision Engineering
Graduate School of Engineering
Osaka University
2-1 Yamada-Oka, Suita, Osaka 565-0871, Japan

2022年9月16日(金) 5:34 Tevin Li <tevindotli at gmail.com>:

> Hello Tone,
> Thank you very much for your assistance. I have already downloaded the
> precompiled MacOS file earlier and (despite using a command such as port
> install tk libGLU xorg-libX11 xorg-libXmu fftw-3 ImageMagick openbabel) I
> am still running into this message whenever I type in ./xcrysden:
>
>
> XCRYSDEN_TOPDIR=/Users/tevinli/Downloads/xcrysden-1.6.2-bin-shared
>
> XCRYSDEN_SCRATCH=/var/folders/y9/m7ct78_s13x5hmqntp0lvcz00000gn/T/
>
>
> dyld[89607]: Library not loaded: '/opt/local/lib/libfftw3.3.dylib'
>
>   Referenced from:
> '/Users/tevinli/Downloads/xcrysden-1.6.2-bin-shared/bin/xcrys'
>
>   Reason: tried:
> '/Users/tevinli/Downloads/xcrysden-1.6.2-bin-shared/external/lib/libfftw3.3.dylib'
> (no such file), '/opt/local/lib/libfftw3.3.dylib' (mach-o file, but is an
> incompatible architecture (have (arm64), need (x86_64))),
> '/usr/local/lib/libfftw3.3.dylib' (no such file),
> '/usr/lib/libfftw3.3.dylib' (no such file)
>
> ./xcrysden: line 279: 89607 Abort trap: 6           "${XCRYSDEN_XCRYS_DIR}/xcrys"
> "${XCRYSDEN_TOPDIR}/Tcl/xcInit.tcl" $USE -- "$XCRYSDEN_TOPDIR"
> "$XCRYSDEN_SCRATCH" "$@" > /dev/null
>
>
> Can you please help in providing assistance in resolving this issue? Thank
> you very much.
>
>
> Regards,
>
> Tevin
>
>
>
> On Thu, Sep 15, 2022 at 1:45 AM Tone Kokalj <tone.kokalj at ijs.si> wrote:
>
>> On Thu, 2022-09-15 at 01:05 -0400, Tevin Li wrote:
>> > Hello,
>> >
>> > I apologize for sending this message again, but I am attempting to
>> > compile the source package for xcrysden for MacOS and I am
>> > encountering the following error message:
>> >
>> > --2022-09-10 01:16:09--
>> > ftp://ftp.freedesktop.org/pub/mesa/mesa-18.3.6.tar.gz
>> >   (try:19) => ‘mesa-18.3.6.tar.gz’
>> > ==> CWD not required.
>> > ==> SIZE mesa-18.3.6.tar.gz ... 20348664
>> > ==> PASV ...
>> > Cannot parse PASV response.
>> > Retrying.
>>
>> You can avoid compiling external libraries. Instead of "make", use
>> "make xcrysden".
>>
>> As an alternative you may try a precompiled mac os version:
>> http://www.xcrysden.org/download/xcrysden-1.6.2-macosx-shared.tar.gz
>> You may also check Macports or Fink version
>> https://ports.macports.org/port/xcrysden/
>> https://pdb.finkproject.org/pdb/package.php/xcrysden
>>
>> Best regards, Tone
>> --
>> Jožef Stefan Institute, Ljubljana, Slovenia
>>
>>
>>
>>
>> _______________________________________________
>> XCrySDen mailing list
>> XCrySDen at democritos.it
>> http://www.democritos.it/mailman/listinfo/xcrysden
>>
> _______________________________________________
> XCrySDen mailing list
> XCrySDen at democritos.it
> http://www.democritos.it/mailman/listinfo/xcrysden
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.democritos.it/pipermail/xcrysden/attachments/20220924/ba6cf3cc/attachment.htm 
-------------- next part --------------
#########################################################################
#
#  Make.sys for X11 semishared compilation on Mac OS X
#
#  It will download Tcl, Tk, Togl, and FTTW3 tarballs from the
#  internet and compile them for use with X11. After compilation they
#  are installed in external/lib & external/include.
#
#
#  This Make.sys uses the XQuartz.
#
########################################################################

#------------------------------------------------------------------------
# if you have a GNU make it is better to set the MAKE variable to point
# to gnu make
#------------------------------------------------------------------------
MAKE = make

#------------------------------------------------------------------------
# compilers & flags
#------------------------------------------------------------------------
# C-preprocessor flags
CPPFLAGS ?=
# C-compiler flags
CFLAGS += -ffast-math -funroll-loops -fPIC -pedantic -Wall

CC     = gcc 
LDLIB  = -ldl
MATH   = -lm -lc

FFLAGS  += -static-libgfortran -static-libgcc -fdefault-double-8 -fdefault-real-8 -O2
FC      = gfortran 

#-------------------------------------------
#debug options
#CFLAGS = -g
#-------------------------------------------

#------------------------------------------------------------------------
# X-libraries & include files
#------------------------------------------------------------------------
X_LIB     = -lXmu -lX11 
X_INCDIR  = -I/opt/X11/include

#------------------------------------------------------------------------
# EXTERNAL LIBRARIES: Tcl/Tk/Mesa/Togl/FFTW
#------------------------------------------------------------------------

# setting to "yes" will compile the corresponding library in external/src/
COMPILE_TCLTK    = yes
COMPILE_TOGL     = yes
COMPILE_MESA     = no
COMPILE_FFTW     = no
# this is only used for some testing purposes
COMPILE_MESCHACH = no

# Do we want a shared library version of Tcl/Tk/Mesa/Togl?  If we want
# shared then set the following flags to: --enable-shared else set the
# following flag to: --disable-shared

TCLTK_OPTIONS  = --enable-shared \
               --with-x CFLAGS=-I/opt/X11/include --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
TOGL_OPTIONS   = --enable-shared --with-tcl=$(TOPDIR)/external/lib --with-tk=$(TOPDIR)/external/lib \
               --with-x CFLAGS=-I/opt/X11/include --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib 
MESA_OPTIONS   = --enable-shared
GLU_OPTIONS    = --enable-shared
MESA_TARGET    = linux
FFTW_OPTIONS   = --enable-shared

#------------------------------------------------------------------------
#
# Libraries
#
#------------------------------------------------------------------------

TCL_LIB      = -L$(TOPDIR)/external/lib -ltcl$(TCL_VER2)
TK_LIB       = -ltk$(TCL_VER2)
TOGL_LIB     = -lTogl$(TOGL_VER)
GLU_LIB      = -L/opt/X11/lib -lGLU
GL_LIB       = -lGL
FFTW3_LIB    = -L/opt/homebrew/lib -lfftw3

#------------------------------------------------------------------------
#
# Include directories
#
#------------------------------------------------------------------------

TCL_INCDIR      = -I$(TOPDIR)/external/include
TK_INCDIR       =
TOGL_INCDIR     =
GL_INCDIR       = -I/opt/X11/include
FFTW3_INCDIR    = -I/opt/homebrew/include

#------------------------------------------------------------------------


More information about the XCrySDen mailing list