NREL / SAM

System Advisor Model (SAM)
BSD 3-Clause "New" or "Revised" License
318 stars 136 forks source link

Build SAM error on Apple silicon (arm64) #1774

Closed wta12 closed 1 month ago

wta12 commented 1 month ago

I try to follow up the SAM build instruction and got errors as below. Wonder if any workarounds are available for this ? Btw, I just need Dview for ARM Mac but looks like all combine in one package build SAM configure step: can't build nlopt- make configure config.log

configure:2528: $? = 1
configure:2566: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "nlopt"
| #define PACKAGE_TARNAME "nlopt"
| #define PACKAGE_VERSION "2.4.2"
| #define PACKAGE_STRING "nlopt 2.4.2"
| #define PACKAGE_BUGREPORT "sam@nrel.gov"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2571: error: in `/Users/kcu/DevelopBuild/DviewARM/sam_dev/build/Release':
configure:2573: error: C compiler cannot create executables
See `config.log' for more details

If I try to run make the wex returns error **make: *** [all] Error 2

[ 63%] Building C object wex/src/CMakeFiles/wex.dir/plot/qhull/userprintf_rbox.c.o
2 warnings generated.
5 warnings generated.
[ 64%] Linking CXX static library ../../wex.a
[ 64%] Built target wex
make: *** [all] Error 2
wta12 commented 1 month ago

Got SAM built on Apple silicon after a few cleanup and apply ENV at terminal level