[Bug] OSX Yosemite 10.10 fails when compiling

[Bug] OSX Yosemite 10.10 fails when compiling

# ProductName:    Mac OS X
# ProductVersion:    10.10.3
# BuildVersion:    14D136

curl -O https://www.openmprtl.org/sites/default/files/libomp_20150401_oss.tgz
gunzip -c libomp_20150401_oss.tgz | tar xopf -
cd libomp_oss

in line 124..126 of libomp_oss/src/makefile.mk:
...
ifeq "$(os)" "mac"
    mac_os_new := $(shell /bin/sh -c 'if [[ `sw_vers -productVersion` > 10.6 ]]; then echo "1"; else echo "0"; fi')
endif
...

The alfa-numeric comparison is wrong since OSX has reached 10.10 !

 

 

 

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks for your post!

This issue will be fixed in the next release.

For now you can replace the mentioned lines with the following one:

ifeq "$(os)" "mac"
    mac_os_new := $(shell /bin/sh -c 'a=`sw_vers -productVersion`;ah=$${a/\.*/};al=$${a/$$ah\./};al=$${al/\.*/};if [[ $$ah -gt 10 || $$al -gt 6 ]];then echo 1;else echo 0;fi')
endif

thanks!

I preferred in my code: 

sw_vers -productVersion | awk 'BEGIN{FS ="."}{print $2}' 

 

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today