Error installing petsc with homebrew - homebrew

I tried installing petsc with homebrew on OSX 10.10.1 with:
$brew install petsc
I get one error installing one dependency:
==> Installing petsc dependency: hypre
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading http://ftp.mcs.anl.gov/pub/petsc/externalpackages/hypre-2.9.0b.tar.gz
Already downloaded: /Library/Caches/Homebrew/hypre-2.9.0b.tar.gz
Error: SHA1 mismatch
Expected: aaf8354437be38aa2fbcc944ab64d464a5b39207
Actual: bd7ca57e45badf322b9c9cb970403c191287da72
Archive: /Library/Caches/Homebrew/hypre-2.9.0b.tar.gz
To retry an incomplete download, remove the file above.
So I tried installing hypre with homebrew
$brew install hypre
and I didn't get any error
==> Summary
🍺 /usr/local/Cellar/hypre/2.9.0b_1: 48 files, 4.5M
Finally, I modified the petsc formula and commented out this line
depends_on "hypre" => ["with-mpi", :recommended]
Now I can install petsc but it doesn't work
configure:12901: WARNING: No PETSC_DIR set - trying to autodetect
configure:12919: Using PETSC_DIR=/usr/local
configure:12966: mpif90 -o conftest -ffast-math -frecord-marker=4 -DHAVE_NUMPY -I/usr/local/lib/python2.7/site-packages/numpy/core/include -fno-realloc-lhs -ffree-line-length-none -ffixed-line-length-none -O3 conftest.F90 -lparmetis -lmetis -llapack -lpthread -lm -lstdc++ -L/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -u _PyMac_Error /usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Python -ldl -framework CoreFoundation -L/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2 -L/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/../../.. -lgfortran -lquadmath -lm -L/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2 -L/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/../../.. -lgfortran -lquadmath -lm >&5
conftest.F90:3.30:
use petsc
1
Fatal Error: Can't open module file 'petsc.mod' for reading at (1): No such file or directory

Related

brew: unable to install mumps on mac

I am trying to install ipopt by:
brew install ipopt.rb --with-openblas
and I got the following error:
==> Installing dependencies for ipopt: mumps
==> Installing ipopt dependency: mumps
==> Downloading http://mumps.enseeiht.fr/MUMPS_5.1.1.tar.gz
Already downloaded: /Users/yufeiliu/Library/Caches/Homebrew/mumps-5.1.1.tar.gz
==> make alllib LIBEXT=.dylib AR= -dynamiclib -Wl,-install_name -Wl,/usr/local/Cellar/mumps/5.1.
Last 15 lines from /Users/yufeiliu/Library/Logs/Homebrew/mumps/01.make:
clang -fPIC -I../include -O -c symbfac.c -o symbfac.o
clang -fPIC -I../include -O -c interface.c -o interface.o
clang -fPIC -I../include -O -c sort.c -o sort.o
clang -fPIC -I../include -O -c minpriority.c -o minpriority.o
dynamiclib -Wl,-install_name -Wl,/usr/local/Cellar/mumps/5.1.1_1/lib/libpord.dylib -undefined dynamic_lookup -o libpord.dylib graph.o gbipart.o gbisect.o ddcreate.o ddbisect.o nestdiss.o multisector.o gelim.o bucket.o tree.o symbfac.o interface.o sort.o minpriority.o
make[2]: dynamiclib: No such file or directory
make[2]: [libpord.dylib] Error 1 (ignored)
echo libpord.dylib
libpord.dylib
if [ "./PORD/lib/" != "" ] ; then \
cp ./PORD/lib//libpord.dylib lib/libpord.dylib; \
fi;
cp: ./PORD/lib//libpord.dylib: No such file or directory
make[1]: *** [lib/libpord.dylib] Error 1
make: *** [c] Error 2
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/brewsci/homebrew-science/issues
Does anyone know how to solve this?
Unfortunately installation of mumps package with brew is very problematic at this moment. You have two different ways to install mumps
Method 1:
brew tap brewsci/science
brew install mumps
if that didn't work, download mumps.rb from here
brew install ./mumps.rb
Method 2
brew tap dpo/openblas
brew install mumps
The second method might lead to some issues with scalapack later.
Update: Unfortunately the above method might not work properly anymore. I have updated the installation method here.

Error installing SDL-ttf-0.6.2.1 in Haskell: cannot find -lSDL_ttf

I'm running into the following problem trying to cabal install reactive-banana-sdl:
c:/program files/haskell platform/7.10.2-a/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL_ttf
collect2: ld returned 1 exit status
linking dist\build\Graphics\UI\SDL\TTF\Version_hsc_make.o failed (exit code 1)
command was: C:\Program Files\Haskell Platform\7.10.2-a\mingw\bin\gcc.exe dist\build\Graphics\UI\SDL\TTF\Version_hsc_make.o dist\build\Graphics\UI\SDL\TTF\Version_hsc_utils.o -o dist\build\Graphics\UI\SDL\TTF\Version_hsc_make.exe -LC:PFSDL_ttf-2.0.11-win32-x64 -lSDL_ttf -LC:\Users\Owner\AppData\Roaming\cabal\x86_64-windows-ghc-7.10.2\SDL-0.6.5.1-26jmephxohM5v84vz7MqXX -LC:/PF/sdl/lib -lSDL -L/mingw64/lib -lmingw32 -lSDLmain -lSDL -mwindows -LC:\Program Files\Haskell Platform\7.10.2-a\lib\base_GDytRqRVSUX7zckgKqJjgw -lwsock32 -luser32 -lshell32 -LC:\Program Files\Haskell Platform\7.10.2-a\lib\integ_2aU3IZNMF9a7mQ0OzsZ0dS -LC:\Program Files\Haskell Platform\7.10.2-a\lib\ghcpr_8TmvWUcS1U1IKHT0levwg3 -LC:\Program Files\Haskell Platform\7.10.2-a\lib/rts -lm -lwsock32 -lgdi32 -lwinmm
C:\Program Files\Haskell Platform\7.10.2-a\bin\hsc2hs.exe returned ExitFailure 1
Failed to install SDL-ttf-0.6.2.1
What do I do?
Some details: I'm using Windows 7, and doing this in MINGW64. I've installed sdl-ttf through pacman, downloaded SDL_ttf from https://www.libsdl.org/projects/SDL_ttf/release-1.2.html, and replaced SDL_platform.h (https://hg.libsdl.org/SDL/raw-file/e217ed463f25/include/SDL_platform.h) to fix another error ("winapifamily.h: No such file or directory" when compiling SDL in Code::Blocks). I made sure to include extra directories.
cabal install -v3 reactive-banana-sdl --extra-include-dirs=C:\PF\SDL_ttf-2.0.11-win32-x64 --extra-lib-dirs=C:\PF\SDL_ttf-2.0.11-win32-x64

Luarocks error building luafilesystem

I'm using Luarocks 2.2.0beta1 to install luafilesystem on windows 7 with lua 5.2 and mingw. I got this error:
>luarocks install luafilesystem
Installing http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock...
Using http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock... switching to 'build' mode
mingw32-gcc -O2 -c -o src/lfs.o -IC:/lua/include/src/lfs.c
mingw32-gcc -shared -o lfs.dll src/lfs.o C:/lua/bin/lua52.dll -lm
C:\lua\bin\lua52.dll: file not recognized: File format not recognized
collect2.exe: error: Id returned 1 exit status
Error: Build error: Failed compiling module lfs.dll
any idea how to fix this?
note: until now, I have no problem installing other module with luarocks that have no dependency with luafilesystem.
Solved, this problem arise because actually I'm not using the same MinGW compiler when building lua52.dll. I don't know which compiler I use at the first time. Thanks to #siffiejoe

Unable to install GDAL in python 3 using pip (clang failed with exit status 1)

After running sudo pip3.4 install gdal from terminal (Mac OS X Mavericks) I obtain an error message saying that the 'col_port.h' file was not found and displaying the following error: command '/user/bin/clang/ failed with exit status 1 (the full message is below).
I have gdal 1.11 (the complete framework version downloaded from kingchaos.com) and the most recent version of the Xcode command line tools -Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Here is the error that I get after running the sudo pip3.4 install gdal command:
/usr/bin/clang -fno-strict-aliasing -Werror=declaration-after-statement -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -I/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/1.11/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-3.4/extensions/gdal_wrap.o
extensions/gdal_wrap.cpp:2230:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
extensions/gdal_wrap.cpp:2233:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
extensions/gdal_wrap.cpp:2535:22: warning: unused variable 'swig_empty_runtime_method_table' [-Wunused-variable]
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
^
extensions/gdal_wrap.cpp:2855:10: fatal error: 'cpl_port.h' file not found
#include "cpl_port.h"
^
3 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
The solution was to use homebrew and, after that, run pip3.4
brew install GDAL
and, once installed,
pip3.4 install gdal
Had this problem today. Installed GDAL with brew and it failed with pip3. The solution was to make sure that the version you try to install with pip is the same as homebrew has installed.
So first install gdal with homebrew using
brew install gdal
You should be able to see the version that is being installed during installation. If you have already installed gdal before you can check the version with:
brew info gdal
For me this showed that the version of gdal brew installed for me was: 2.4.4
So then you can install the correct version with pip using
pip3 install gdal==2.4.4
This finally worked for me.

I can't make SQSH 2.1.7 with freetds 0.91

I am having trouble building sqsh against freetds. This post cross-references with https://sourceforge.net/projects/sqsh/forums/forum/365924/topic/4716627.
I've installed Freetds 0.91 from sunfreeware.com on Solaris 10. I've confirmed the installation as noted in Chapter 9 of the user guide.
Following the sqsh notes from sqsh.org, I've set the SYBASE environment variable to /usr/local/freetds and run the configure script. (I do not have Sybase installed on this machine. I shouldn't need it.)
SYBASE=/usr/local/freetds; export SYBASE
./configure --with-readline
I've checked the Makefile, it seems to be right given what I've read.
SYBASE_LIBS = -lct -ltds -lnsl -ldl -lm
When I run make, I get(after building a bunch of stuff):
make
...
...[build output]...
...
gcc -L/usr/local/freetds/lib -L/usr/local/lib cmd_alias.o cmd_bcp.o cmd_buf.o cmd_connect.o cmd_do.o cmd_echo.o cmd_exit.o cmd_for.o cmd_func.o cmd_go.o cmd_help.o cmd_history.o cmd_if.o cmd_input.o cmd_jobs.o cmd_kill.o cmd_lock.o cmd_loop.o cmd_misc.o cmd_read.o cmd_reconnect.o cmd_redraw.o cmd_reset.o cmd_return.o cmd_rpc.o cmd_set.o cmd_shell.o cmd_show.o cmd_sleep.o cmd_wait.o cmd_warranty.o cmd_while.o var_ctlib.o var_date.o var_debug.o var_dsp.o var_hist.o var_misc.o var_passwd.o var_readline.o var_thresh.o dsp.o dsp_bcp.o dsp_csv.o dsp_conv.o dsp_desc.o dsp_horiz.o dsp_html.o dsp_meta.o dsp_none.o dsp_out.o dsp_pretty.o dsp_vert.o dsp_x.o sqsh_alias.o sqsh_args.o sqsh_avl.o sqsh_buf.o sqsh_cmd.o sqsh_compat.o sqsh_ctx.o sqsh_debug.o sqsh_env.o sqsh_error.o sqsh_expand.o sqsh_fd.o sqsh_filter.o sqsh_fork.o sqsh_func.o sqsh_getopt.o sqsh_global.o sqsh_history.o sqsh_init.o sqsh_job.o sqsh_readline.o sqsh_sig.o sqsh_sigcld.o sqsh_stdin.o sqsh_strchr.o sqsh_tok.o sqsh_varbuf.o sqsh_main.o -lct -ltds -lnsl -ldl -lm -lreadline -lcurses -o sqsh
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/freetds/lib/libct.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/freetds/lib/libct.so value=LOCL);
ld: fatal: file /usr/local/freetds/lib/libtds.a: unknown file type
ld: fatal: File processing errors. No output written to sqsh
collect2: ld returned 1 exit status
make[1]: *** [sqsh] Error 1
make[1]: Leaving directory `/opt/BFMIfiles/src/sqsh-2.1.7/src'
make: *** [build-subdirs] Error 2
Is the error related to this: http://www.freetds.org/faq.html#where.is.libtds.so?
Any ideas?
Reference on freetds mailing list.
Reference on sqsh help forum.
When editing src/Makefile, get rid of -ltds (as suggested here) and change -ldl to -liconv. I got that last bit from the cygwin version of the sqsh README.
I used SYBASE=/usr/local/freetds/.
After that I had to set the LD_LIBRARY_PATH=$SYBASE/lib/:/usr/local/lib/ to get the freetds and liconv libraries.
Big thanks to the freetds mailing list. http://lists.ibiblio.org/pipermail/freetds/2011q3/027382.html

Resources