-lcc dynamic missing on latest Mac

From NWChem

Viewed 757 times, With a total of 4 Posts
Jump to: navigation, search

Gets Around
Threads 3
Posts 85
I rebuilt NWChem on my Mac for the first time in a few months and got an error about -lcc_dynamic not being available.

Anyways, I am running 10.11.6 (El Capitan) with the latest Xcode as of this date (I do not know the version). I compiled with Intel 17.0 compilers, but this shouldn't matter, since they just use the system C library.

Anyways, I am noting this in case others run into the same issue. The fix is trivial, but is listed below for posterity.

src jrhammon$ svn diff config/makefile.h
Index: config/makefile.h
=======================================================
--- config/makefile.h (revision 28547)
+++ config/makefile.h (working copy)
@@ -1015,7 +1015,7 @@
    ifeq ($(_GCC4),Y) 
# EXTRA_LIBS +=
else
- EXTRA_LIBS += -lm -lcc_dynamic
+ EXTRA_LIBS +=
    endif
endif
endif
@@ -1182,7 +1182,7 @@
    ifeq ($(_GCC4),Y) 
# EXTRA_LIBS +=
else
- EXTRA_LIBS += -lm -lcc_dynamic
+ EXTRA_LIBS +=
    endif

# required for mpich2 3.x and clang

Forum Vet
Threads 9
Posts 1501
What is the output of the commands

cc -v
cc -dM -E - < /dev/null|egrep __VERSION

on your system?

Thanks
Edited On 11:23:31 AM PDT - Thu, Sep 22nd 2016 by Edoapra

Gets Around
Threads 3
Posts 85
$ cc -v
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ cc -dM -E - < /dev/null|egrep __VERSION
#define __VERSION__ "4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)"


I don't know if it is relevant, but I had to switch the following recently to address an unrelated issue.
sudo xcode-select -s /Library/Developer/CommandLineTools

Forum Vet
Threads 9
Posts 1501
OK
I am still not sure why your environment was triggering the now obsolete lcc_dynamic, but the bit is gone now it can be only explicitly turned by defining USE_CCDYNAMIC

Gets Around
Threads 3
Posts 85
The test that config/makefile.h uses (line 1014) to detect whether it is needed changes behavior from Intel 16 to Intel 17.

$ icc-16.0 -dM -E - < /dev/null | egrep __VERS | cut -c22|awk ' /3/  {print "N";exit}; /2/ {print "N";exit};{print "Y"}'
Y
$ icc-17.0 -dM -E - < /dev/null | egrep __VERS | cut -c22|awk ' /3/  {print "N";exit}; /2/ {print "N";exit};{print "Y"}'
$ 

$ icc-16.0 -dM -E - < /dev/null | egrep __VERS 
#define __VERSION__ "Intel(R) C++ gcc 4.9 mode"
$ icc-17.0 -dM -E - < /dev/null | egrep __VERS 
$ 


It seems we need to test for Intel 17+ in addition to the _GCC4 test that is there already.


Forum >> NWChem's corner >> Compiling NWChem



Who's here now Members 0 Guests 1 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC