F2py errors with a MAC M2 - macos

I'm trying to use f2py on a MAC M2. My programs all run successfully on an Intel MAC. The first part of the process to produce C code from my Fortran source which seems to work but I get the following error when the C compilation attempts and fails
clang-14clang-14: : error: error: the clang compiler does not support '-march=core2'the clang compiler does not support '-march=core2'
Followed by this long string
error: Command "x86_64-apple-darwin13.4.0-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/condaTest/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/envs/condaTest/include -arch arm64 -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /opt/homebrew/Caskroom/miniforge/base/include -D_FORTIFY_SOURCE=2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -ftrapping-math -DNPY_DISABLE_OPTIMIZATION=1 -I/var/folders/np/393cjs953159dbj23mgqmlqr0000gn/T/tmpf0_vcv2d/src.macosx-11.0-arm64-3.9 -I/opt/homebrew/Caskroom/miniforge/base/envs/condaTest/lib/python3.9/site-packages/numpy/core/include -I/opt/homebrew/Caskroom/miniforge/base/envs/condaTest/include/python3.9 -c /var/folders/np/393cjs953159dbj23mgqmlqr0000gn/T/tmpf0_vcv2d/src.macosx-11.0-arm64-3.9/fib3module.c -o /var/folders/np/393cjs953159dbj23mgqmlqr0000gn/T/tmpf0_vcv2d/var/folders/np/393cjs953159dbj23mgqmlqr0000gn/T/tmpf0_vcv2d/src.macosx-11.0-arm64-3.9/fib3module.o -MMD -MF /var/folders/np/393cjs953159dbj23mgqmlqr0000gn/T/tmpf0_vcv2d/var/folders/np/393cjs953159dbj23mgqmlqr0000gn/T/tmpf0_vcv2d/src.macosx-11.0-arm64-3.9/fib3module.o.d" failed with exit status 1
I would be very grateful for any help with this.

Related

clang backend when I start the terminal

I am not sure how much the
link helps. I have to see the list of these messages upon opening the terminal. It came with installing clang for the sake of pystan I believe.
I would very much like to denoise the following, but I've not got a good clue. Appreciate any input, thanks.
INFO: activate_clang_osx-64.sh made the following environmental changes:
+AR=//anaconda/bin/x86_64-apple-darwin13.4.0-ar
+AS=//anaconda/bin/x86_64-apple-darwin13.4.0-as
+CC=x86_64-apple-darwin13.4.0-clang
+CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe
+CHECKSYMS=//anaconda/bin/x86_64-apple-darwin13.4.0-checksyms
+CLANG=//anaconda/bin/x86_64-apple-darwin13.4.0-clang
+CODESIGN_ALLOCATE=//anaconda/bin/x86_64-apple-darwin13.4.0-codesign_allocate
+CONDA_BUILD_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
+CPPFLAGS=-D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9
+DEBUG_CFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -Og -g -Wall -Wextra
+HOST=x86_64-apple-darwin13.4.0
+INDR=//anaconda/bin/x86_64-apple-darwin13.4.0-indr
+INSTALL_NAME_TOOL=//anaconda/bin/x86_64-apple-darwin13.4.0-install_name_tool
+LD=//anaconda/bin/x86_64-apple-darwin13.4.0-ld
+LDFLAGS=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs
+LDFLAGS_LD=-pie -headerpad_max_install_names -dead_strip_dylibs
+LIBTOOL=//anaconda/bin/x86_64-apple-darwin13.4.0-libtool
+LIPO=//anaconda/bin/x86_64-apple-darwin13.4.0-lipo
+NM=//anaconda/bin/x86_64-apple-darwin13.4.0-nm
+NMEDIT=//anaconda/bin/x86_64-apple-darwin13.4.0-nmedit
+OTOOL=//anaconda/bin/x86_64-apple-darwin13.4.0-otool
+PAGESTUFF=//anaconda/bin/x86_64-apple-darwin13.4.0-pagestuff
+RANLIB=//anaconda/bin/x86_64-apple-darwin13.4.0-ranlib
+REDO_PREBINDING=//anaconda/bin/x86_64-apple-darwin13.4.0-redo_prebinding
+SEGEDIT=//anaconda/bin/x86_64-apple-darwin13.4.0-segedit
+SEG_ADDR_TABLE=//anaconda/bin/x86_64-apple-darwin13.4.0-seg_addr_table
+SEG_HACK=//anaconda/bin/x86_64-apple-darwin13.4.0-seg_hack
+SIZE=//anaconda/bin/x86_64-apple-darwin13.4.0-size
+STRINGS=//anaconda/bin/x86_64-apple-darwin13.4.0-strings
+STRIP=//anaconda/bin/x86_64-apple-darwin13.4.0-strip
+_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_apple_darwin13_4_0
INFO: activate_clangxx_osx-64.sh made the following environmental changes:
+CLANGXX=//anaconda/bin/x86_64-apple-darwin13.4.0-clang++
+CXX=x86_64-apple-darwin13.4.0-clang++
+CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0
+DEBUG_CXXFLAGS=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -Og -g -Wall -Wextra
I actually fixed this by the link, but it remains murky which of the versions btw clangxx_osx-64-4.0.1-h22b1bf0_8 vs. clangxx_osx-64-4.0.1-h22b1bf0_11 caused it. It seemed more likely that the recent version should be the reason for it, but I actually got lucky by commenting out the lines that were similarly mentioned in the link from the older version..

linux kernel 4.4 build error: garbage following instruction

I am trying to build a custom linux kernel 4.4 running for AT91 with mostly default configuration that I set up from menuconfig. The build fails with the following error. The gcc version is 4.6.3 and the binutils version is 2.22. There is nothing obvious in main.c which is where the compilation is at the time of failure. Dont understand what to look for as I have run out of ideas.
arm-none-linux-gnueabi-gcc -Wp,-MD,init/.main.o.d -nostdinc -isystem /opt/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -I./arch/arm/include -Iarch/arm/include/generated/uapi -Iarch/arm/include/generated -Iinclude -I./arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=apcs-gnu -mno-thumb-interwork -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -O2 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -gdwarf-2 -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -Werror=implicit-int -Werror=strict-prototypes -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(main)" -D"KBUILD_MODNAME=KBUILD_STR(main)" -c -o init/.tmp_main.o init/main.c
/tmp/ccbj4Zgm.s: Assembler messages:
/tmp/ccbj4Zgm.s:852: Error: garbage following instruction -- `dmb ishst'
/tmp/ccbj4Zgm.s:874: Error: garbage following instruction -- `dmb ishst'
/tmp/ccbj4Zgm.s:909: Error: garbage following instruction -- `dmb ish'
/tmp/ccbj4Zgm.s:921: Error: garbage following instruction -- `dsb ishst'
make[2]: *** [init/main.o] Error 1
make[1]: *** [init] Error 2

Installing Cloudera Hue on mac os x mountain lion

So I've installed all the dependencies and when I do make install, the following error comes:
--- Installing core source structure...
--- Installing Desktop core...
INSTALL_DIR=/usr/local/hue make -C desktop install
INSTALL_DIR=/usr/local/hue/desktop/core \
INSTALL_CONF_DIR=/usr/local/hue/desktop/conf \
make -C core install-bdist
--- Building egg for Twisted
running bdist_egg
running egg_info
writing requirements to Twisted.egg-info/requires.txt
writing Twisted.egg-info/PKG-INFO
writing top-level names to Twisted.egg-info/top_level.txt
writing dependency_links to Twisted.egg-info/dependency_links.txt
reading manifest file 'Twisted.egg-info/SOURCES.txt'
writing manifest file 'Twisted.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-intel/egg
running install_lib
running build_py
running build_ext
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c conftest.c -o conftest.o
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c conftest.c -o conftest.o
clang: warning: argument unused during compilation: '-mno-fused-madd'
conftest.c:1:10: fatal error: 'sys/epoll.h' file not found
#include <sys/epoll.h>
^
1 error generated.
building 'twisted.internet.cfsupport' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c twisted/internet/cfsupport/cfsupport.c -o build/temp.macosx-10.8-intel-2.7/twisted/internet/cfsupport/cfsupport.o -w
twisted/internet/cfsupport/cfsupport.c:128:4: error: assignment to cast is illegal, lvalue casts are not supported
((PyObject*)__pyx_v_socket) = Py_None; Py_INCREF(((PyObject*)__pyx_v_socket));
~^~~~~~~~~~~~~~~~~~~~~~~~~~ ~
twisted/internet/cfsupport/cfsupport.c:134:4: error: assignment to cast is illegal, lvalue casts are not supported
((PyObject *)__pyx_v_socket) = __pyx_1;
~^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~
twisted/internet/cfsupport/cfsupport.c:829:4: error: assignment to cast is illegal, lvalue casts are not supported
((PyObject*)__pyx_v_obj) = Py_None; Py_INCREF(((PyObject*)__pyx_v_obj));
~^~~~~~~~~~~~~~~~~~~~~~~ ~
twisted/internet/cfsupport/cfsupport.c:835:4: error: assignment to cast is illegal, lvalue casts are not supported
((PyObject *)__pyx_v_obj) = __pyx_1;
~^~~~~~~~~~~~~~~~~~~~~~~~ ~
4 errors generated.
error: command 'clang' failed with exit status 1
make[2]: *** [/Users/rajat.khandelwal/Downloads/hue-2.4.0/desktop/core/build/Twisted/egg.stamp] Error 1
make[1]: *** [.recursive-install-bdist/core] Error 2
make: *** [install-desktop] Error 2
Also submitted the issue on github: https://github.com/cloudera/hue/issues/31
You need to delete
desktop/core/ext-py/Twisted and retry.
Also Hue 2.5 release (which contains this fix) is around the corner (this Monday/Tuesday).

llvm-gcc missing on Mac OS X Lion: can not install mysql-python

I recently upgraded to Mac OS X 10.7 from 10.6.
I decided to use Python 2.7.
But when I'm trying to install the MySQLdb module to run Django, it fails:
$ sudo pip install MySQL-python
Downloading/unpacking MySQL-python
[…]
Running setup.py install for MySQL-python
building '_mysql' extension
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
unable to execute llvm-gcc-4.2: No such file or directory
error: command 'llvm-gcc-4.2' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='~/Sites/gugsm/build/MySQL-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-AwMuqj-record/install-record.txt:
running install
running build
[…]
building '_mysql' extension
creating build/temp.macosx-10.7-intel-2.7
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
unable to execute llvm-gcc-4.2: No such file or directory
error: command 'llvm-gcc-4.2' failed with exit status 1
----------------------------------------
The reason is that I no longer have llvm-gcc nor gcc binaries.
I tried to upgrade XCode from 3.something to 4.3.2, but it din't help. It comes as a simple app and it doesn't populate /usr/bin with llvm-gcc.
What am I doing wrong?
In Xcode 4.3's Preferences menu, select Downloads and then install Command Line Tools.
making a symlink worked for me:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

"internal compiler error" from yajl-ruby build on OpenSUSE 12.1

As a requirement for chef-client, I am trying to install yajl-ruby on OpenSUSE 12.1. So far, it is returning the following message:
linux:~ # gem install yajl-ruby
Building native extensions. This could take a while...
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
creating Makefile
make
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl_alloc.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl_buf.c
gcc -I. -I/usr/lib64/ruby/1.8/x86_64-linux -I/usr/lib64/ruby/1.8/x86_64-linux -I. -fPIC -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -g -fno-strict-aliasing -fPIC -Wall -funroll-loops -c yajl_encode.c
yajl_encode.c: In function ‘hexToDigit’:
yajl_encode.c:201:1: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
make: *** [yajl_encode.o] Error 1
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/yajl-ruby-1.1.0 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
The appropriate packages are installed:
zypper install ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
It may be an issue with the compiler or there may be an issue specific on OpenSUSE. So far, I am not sure which path to take.
gcc clearly recommends you to send bug report to OpenSuse with full preprocessed source (-E option instead of "-c" and add a redirect to file). This may be because opensuse gcc might have some modifications. You should check instructions on bugs.opensuse.org and send a bug report to OpenSuse. If the bug is in basic gcc too, opensuse bugzilla people will forward it upstream or will ask you to do this
To avoid an "internal compiler error" without sending bugs you can try to change build options. Usually "internal compiler error" means that something goes wrong in complex process of optimizations, so you can just change this process (order of optimization stages and which are enabled). Easiest is to change level of optimization (e.g. replace -O2 with -O1 or -O0) or add something like -Osize.

Resources