FEAP User Forum
FEAP => Installation => Topic started by: Prof. S. Govindjee on November 11, 2020, 01:27:28 PM
-
If you are using the built in Mac gcc on a newer Mac it is likely Apple's clang compiler version 12.0.0 or higher. This causes an error in compiling x11u.c that does not occur with GNU's gcc compiler. Something to the effect
error: implicit declaration of function 'plstop_' is invalid
To fix the problem you can patch x11u.c. Go to function gdx11_refresh_digwin( ) and after the declarations, roughly line 253, add the following additional declaration
void plstop_();
This should fix the error
-
Dear Prof. Govindjee,
I am new to macOS and having difficulty compiling FEAP version 8.6.1k due to a similar issue with x11u.c. The error message during compile on a macbookpro running macos Monterey 12.3.1 is given below.
x11u.c:69:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
make[2]: *** [/Users/fethi/oscmw/feap/Feap8_6g.a(x11u.o)] Error 1
The makefiles I used are attached. The symbolic links under /usr/X11 and /usr/X11R6 seem to be empty. Moreover the Xlib.h seems to be located under
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
which is an absurd location. When that line is included in the CINCLUDE statement in makefile.in, that does solve the issue but produce additional errors related with some other lines in the x11u.c.
I would appreciate any advise regarding the resolution of this issue,
Fethi
-
I have not tried to install on a machine with Monterey yet but plan to do so this week. I will let you know what I figure out.
-
One quick question however, did you install the developer tools for X?
-
I don't think I did that ;D
you mean developer tools found in Xcode, right?
-
You will want the developer tools, the command line developer tools, and you will also want to install the x11 libraries and headers, for example using brew.
-
Thank you very much for the help. I was able to resolve the issue by loading the X libraries and headers found in the xquartz package using homebrew. (https://www.flagsoft.com/cmswp/en/support/kb/running-x11-applications-on-mac-os-x/ (https://www.flagsoft.com/cmswp/en/support/kb/running-x11-applications-on-mac-os-x/))
Note that the Xcode package was not required for the compile to proceed (though I am going to download and install that).