Error when compile umfpack after the update of Mac - fortran

I was able to use umfpack, but I just found that I cannot use it as before. I guess the reason is my recent update of Mac.
I already installed SuiteSparse VERSION 4.5.4. I use the Fortran interface, umfpack.f90, from http://geo.mff.cuni.cz/~lh/Fortran/UMFPACK/. And use gfortran umfpack.f90 umfpack_simple_3subr.f90 -L/usr/local/lib -lumfpack to compile. But I got the following errors:
Undefined symbols for architecture x86_64:
"__gfortran_os_error_at", referenced from:
___mumfpack_MOD_umfpack_zi_operator_pcsr in ccAIP7gL.o
___mumfpack_MOD_umfpack_zi_operator_pcsc in ccAIP7gL.o
___mumfpack_MOD_umfpack_zi_operator_csr in ccAIP7gL.o
___mumfpack_MOD_umfpack_zi_operator_csc in ccAIP7gL.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
I have no clue about solving the problem. Any suggestion is appreciated! Thank you in advance!

Related

“Undefined symbol _main” when linking OpenMP on macOS Catalina

I just installed OpenMP by running
$ brew install gcc
Than I ran my code using
$ gcc-10 -o task -fopenmp task.c
However I got the error message:
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
My code is:
#include <omp.h>
Can someone help me?
I solved this problem replacing gcc with g++

Error when compiling with mpifort

I have downloaded OpenMPI, but after trying to run a simple parallelized Hello world program I get the following error:
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
I guess there is a problem with the compiler because I struggled quite a lot to install OpenMPI.
In order to get that error I typed from the terminal:
mpifort -o hello.f90
Someone can help me?

My macOS project build failed after upgrade to Xcode9

here is the error description:
Undefined symbols for architecture x86_64: "_verify", referenced
from:
_HIDGetDeviceInfo in HIDUtilities.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code
1 (use -v to see invocation)
It happened after upgrade Xcode to version 9.1
HIDUtilities.o is not third-party SDK, HIDUtilities.h and HIDUtilities.c are files in my project.
Any suggestion is appreciated, thanks in advance.

Issue compiling Go program when linking to a compiled version of zeromq on Mac

I've compiled ZeroMQ on Mac OSX 10.9.5 in order to then link to a simple Go program using github.com/pebbe/zmq4, but I'm getting this error I don't understand or know exactly how to remedy.
# github.com/pebbe/zmq4
ld: warning: ignoring file /usr/local/lib/libzmq.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libzmq.dylib
Undefined symbols for architecture i386:
"_zmq_bind", referenced from:
__cgo_59814aec404b_C2func_zmq_bind in zmq4.cgo2.o
__cgo_59814aec404b_Cfunc_zmq_bind in zmq4.cgo2.o
(maybe you meant: __cgo_59814aec404b_Cfunc_zmq_bind, __cgo_59814aec404b_C2func_zmq_bind )
"_zmq_close", referenced from:
__cgo_59814aec404b_C2func_zmq_close in zmq4.cgo2.o
__cgo_59814aec404b_Cfunc_zmq_close in zmq4.cgo2.o
(maybe you meant: __cgo_59814aec404b_C2func_zmq_close,
...
"_zmq_z85_encode", referenced from:
__cgo_59814aec404b_Cfunc_zmq_z85_encode in zmq4.cgo2.o
(maybe you meant: __cgo_59814aec404b_Cfunc_zmq_z85_encode)
ld: symbol(s) not found for architecture i386
collect2: error: ld returned 1 exit status
I think it makes sense that the dylib is made for x86_64 (the Mac) but why Go is trying to link with i386? How do I control that and make it link differently? or even if it's correct?
If you build libzmq yourself, configure with --disable-shared --enable-static keys. If you use homebrew, uninstall zmq and build the library manually. If you need "fat" universal static library use this script:
https://github.com/drewcrawford/libzmq-ios

Installing Boost On Mac Issues

Has anyone had this issue on mac while installing boost or know how to fix? I seem to have everything together but this error. I am using OS X 10.10 & and Xcode 6.1.1.
This is what I used for the install and to make the framework.
http://freddy.cellcore.org/post/79587278354/boost-c-libraries-on-osx-xcode-5
https://gist.github.com/faithfracture/c629ae4c7168216a9856
-------------ERROR BELOW---------------
Undefined symbols for architecture x86_64:
"boost::unit_test::unit_test_main(bool (*)(), int, char**)", referenced from:
_main in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)