Newbie issue? gdal install failing: Xcode and or CLT are misconfigured - gdal

I've worked out several sets of problems in installing the libraries for working with D3 and geographic data, but every time I just get to another challenge on this yellow brick road. At least it seems that way after slogging through the installs. I've been to the homebew wikis and many webpages of people who document how they do install on real machines, not 'greenroom' machines
Other people have had similar problems, but I can't see a problem that matches this:
Trying to install gdal (on Mac OS X 10,8.4) following the bost.ocks.org/mike/map guide using
brew install gdal and trying to parse all kinds of errors and solutions others have logged.
I get the following error message now when I run brew install gdal:
gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/libxml2-py.o build/temp.macosx-10.6-intel-2.7/libxml.o build/temp.macosx-10.6-intel-2.7/types.o -L/usr/local/Cellar/libxml2/2.9.1/lib -lxml2 -lm -lz -o build/lib.macosx-10.6-intel-2.7/libxml2mod.so
Your Xcode and or CLT are mis-configured. Try some or all of the following:
xcodebuild -license
sudo xcode-select -switch /path/to/Xcode.app
error: command 'gcc-4.2' failed with exit status 1
I ran xcodebuild -license which completed without an error; then retried brew install gdal again and got the same error. So I ran sudo xcode-select -switch /path/to/Xcode.app and got this message, which puts me back at the proverbial square 1:
xcode-select: Error: An error occurred while trying to -switch to '/path/to/Xcode.app'. (No such file or directory).
What does that message mean? What file or directory is the error referring to? This is what I can't find anywhere on stackoverflow.
Thanks much and in advance,
Francis

If you want to install gdal then I recommend KyngChaos' installer. It will put everything in as a framework. This doesn't really answer the specific question you asked but it perhaps gives you what you were trying to achieve (I hope).

Related

gst-browser fails to start

I have just installed gst-browser (VisualGST) through the Canonical Ubuntu repositories, so I tried to start VisualGST by running gst-browser on the command line. However, I am immediately greeted with an error:
a Smalltalk Stream:2: Abandon
a Smalltalk Stream:2: Error occurred while not in byte code interpreter!!
/usr/lib/libgst.so.7(+0x74c97)[0x7fb5fa5d1c97]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7fb5fa1aaf20]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7fb5fa1aae97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7fb5fa1ac801]
/usr/lib/libgst.so.7(+0x2c6a6)[0x7fb5fa5896a6]
/usr/lib/x86_64-linux-gnu/libsigsegv.so.2(+0xe3c)[0x7fb5f9f68e3c]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7fb5fa1aaf20]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_type_check_is_value_type+0x23)[0x7fb5d4e374f3]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x20785e)[0x7fb5d551185e]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_list_store_new+0xa4)[0x7fb5d5436d94]
[1] 14556 abort (core dumped) gst-browser
What is the cause and meaning of the error, and how can I start VisualGST properly?
GNU Smalltalk version: 3.2.5
EDIT:
This appears to be a known issue. There's a bug report from 2012 on Launchpad: Smalltalk browser does not launch.
This appears to to be "known" issue. As I previously guessed the issue was in libraries link(age).
You can solve your issue either by installing - libgtk2.0-dev.
You can find the whole conversation here. Here is an excerpt:
Digging a bit further, I found that the module "gst-gtk-3.2.92.so" is
linked against "libgtk-x11-2.0.so", which is (now?) only provided by
package: gtk2-devel.
Your second option is to compile it from source. On Fedora 27 (again from the discussion and link above):
I'm on Fedora 27 and after a fresh install this gave me a working build:
sudo dnf install gcc git automake bison flex libtool libtool-ltdl-devel libffi-devel libsigsegv-devel cairo-devel gtk2-devel texinfo
git clone git://git.sv.gnu.org/smalltalk.git
cd smalltalk
autoreconf -vi ./configure make
sudo make install
-----------------------
For future referece you can find testing gst-browser gist.

Installing recen version of GCC

I am a novice so please bear with me if I ask something that is silly in nature. I wanted to install getfem++ on my Mac for my research and had to compile it from the source as per the instructions given at:
http://download.gna.org/getfem/html/homepage/python/install.html#in-a-general-unix-linux-based-systems
However, when I give the following command:
./configure --enable-python=yes
it gives me the following error:
configure: error: g++ do not support option -std=c++11. Update g++ to at least release 4.8.1.
SO I installed g++ using Homebrew and as per the instructions given by #quine on
https://apple.stackexchange.com/questions/99077/how-to-set-gcc-4-8-as-default-gcc-compiler
I edited the bash profile and added the necessary lines to set alias.
Then I checked the g++ version using g++ -v
and it says 4.8.5 as per the last line. Now when I run the configure command as before, I get the same error. as: configure: error: g++ do not support option -std=c++11. Update g++ to at least release 4.8.1.
Can someone help me by pointing out where I am going wrong? Thank you!!

How can I resolve a conflict between Homebrew and MacPorts or Fink?

I was running through an npm tutorial and I needed to install Homebrew. However, after getting one error (cannot install node using available compilers), I ran brew install gcc. Well, that took forever, but it ultimately didn't work because apparently I have either MacPorts or Fink installed.
To be honest, I am not sure when I installed either MacPorts or Fink. I don't remember hearing them before or using them, and I'm not sure what they're used for. Has anyone run into this error before, or have any advice on what to do next? Below are the errors and the links I got in terminal. Thanks!
make[2]: *** [configure-stage2-target-libstdc++-v3] Error 1
make[1]: *** [stage2-bubble] Error 2
make: *** [bootstrap] Error 2
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
READ THIS: https://git.io/brew-troubleshooting
These open issues may also help:
`gcc`: Force DWARF-2 Debugging Data under Pre-Mavericks https://github.com/Homebrew/homebrew/pull/46111
freeimage: patches for gcc 5.0 https://github.com/Homebrew/homebrew/pull/44612
yap: don't use GCC 5, which breaks https://github.com/Homebrew/homebrew/pull/45977
gcc can't find compatible ISL https://github.com/Homebrew/homebrew/issues/44444
How Do I Specify and Use Homebrew gcc-4.8 in a Formula Instead of OS X Bundled gcc? https://github.com/Homebrew/homebrew/issues/46169
isl 0.15, cloog 0.18.4, gcc compatibility patch https://github.com/Homebrew/homebrew/pull/44486
gcc causes false alarms in C++ stdlib check https://github.com/Homebrew/homebrew/issues/45218
apple-gcc42 takes priority over modern gcc https://github.com/Homebrew/homebrew/issues/41055
gcc 4.9.2 fails to produce debugging information https://github.com/Homebrew/homebrew/issues/34976
Object files deleted during build of gcc needed by gdb https://github.com/Homebrew/homebrew/issues/35734
MacOS.(gcc|clang|llvm)_version can return nil https://github.com/Homebrew/homebrew/issues/18781
MacPorts and Fink are package managers for OS X, like Homebrew. As the message says Homebrew doesn’t work well with these two, so you should either stay with MacPorts or Fink, or uninstall them and use Homebrew.
Outside of that, you can check Homebrew’s troubleshooting guide to learn how to fix common issues.

Installing Redis on MAC 10.8.5 Not Working! Where is the DMG ? Undefined symbol -?*&!

I am trying to install latest Redis on my Macbook Pro running 10.8.5 After downloading the tar ball, I am invited to make the project ....
Upon typing make:
LINK redis-server
Undefined symbols for architecture x86_64:
I realize Redis is awesome product, but man where is the DMG? I mean, do you realize how easy it is to install mongodb?
For those interested in the gory details on my mac:
unknownb8f6b11c7271:redis-2.8.19 Mac1$ make
cd src && make all
LINK redis-server
Undefined symbols for architecture x86_64:
"___atomic_add_fetch", referenced from:
_zmalloc in zmalloc.o
_zcalloc in zmalloc.o
_zrealloc in zmalloc.o
_zmalloc_used_memory in zmalloc.o
_zmalloc_get_fragmentation_ratio in zmalloc.o
"___atomic_sub_fetch", referenced from:
_zrealloc in zmalloc.o
_zfree in zmalloc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [redis-server] Error 1
make: *** [all] Error 2
The easy way to install Redis on OS X is using Homebrew. Just install it and run:
brew install redis
This command install already compiled binaries to your system.
Do a
make distclean
first. make distclean should fix this by removing the built hiredis.
The next make should build all again.
[make distclean; CC=gcc make ] I use this command . it works for redis 5.0.6
Using Homebrew it is quite easy to install-
brew update
brew install redis
To check
redis-cli ping
if you are getting PONG
Then you are good to go(y)
I had the same problem while compile C++ project with redis api
BUT I'm using g++ to compile while you using cmake.
if one used g++ compile C++ with redis on Mac(M1), one can add
-lhreids
for project compiling.
It would work.

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux

I am a novice with zeroMQ and I am stuck at binding ØMQ with java on a server running CentOS release 5.9.
Unfortunately, I do not have super user/root privileges on the server and am trying to install ØMQ as a normal user with restricted privileges. I have installed ØMQ by following instructions on http://www.zeromq.org/area:download
Make sure that libtool, autoconf, automake are installed.
Check whether uuid-dev package, uuid/e2fsprogs RPM or equivalent on your system is installed.
Unpack the .tar.gz source archive.
Run ./configure, followed by make.
Could not run the following obviously
To install ØMQ system-wide run sudo make install.
On Linux, run sudo ldconfig after installing ØMQ.
Then I attempted to install jzmq.
Cloned [git clone https://github.com/zeromq/jzmq.git]
Ran autogen.sh
Ran configure
At this point I get the following error
checking for ZeroMQ... no
checking zmq.h usability... no
checking zmq.h presence... no
checking for zmq.h... no
configure: error: cannot find zmq.h
As a result of the above error I am not able to run java tests and get error "no jzmq in java.library.path".
Can anybody help/direct me to how to get java binding for zeromq work when you dont have root privileges to install it? Its difficult to get IT department to install a new software on servers.
Appreciate your help.
Note: I do not have write permissions to /usr directory
Thanks
GBP
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq)
./configure --with-zeromq=/home/user/zeromq
Other steps include
export LD_LIBRARY_PATH=/home/user/zeromq/lib
You can also use JeroMQ (https://github.com/zeromq/jeromq) which is a pure Java implementation of ZeroMQ
I got this working by running autogen.sh on OEL 6 then running configure / compiling / installing on CentOS 5.9. I briefly looked into why autogen.sh was failing and the problem was the tool chain was too old. Since I had a more up-to-date system with a modern tool chain available running autogen.sh on something other than CentOS 5 was the easiest path for me. I'm sure it works fine with other modern Linux variants, I had OEL 6 at my finger tips.
I also did not have access to a standard directory for installation. To get that working I added zmq.jar to my class path, and the run-time linker needed to be able to find the zeromq and jzmq run-time libraries.
I faced the same issue on CentOS 6.5 and found that you need to install "gcc-c++" for this to work.
I used the following to install dependencies:
yum -y install jdk zeromq-devel unzip libtool gcc autoconf automake gcc-c++ python
Note that "jdk" comes from our private repository and it's same what can be downloaded from java.com
The following public repositories are installed on server:
atomic
Actually, I ended up having this same issue, and the following script worked for me, where I installed zeromq into ~ (so that I have ~/lib contains libzmq.a libzmq.la libzmq.so libzmq.so.3 libzmq.so.3.1.0 pkgconfig)
./autogen.sh ./configure --prefix=$HOME \ #because you don't have root privileges
--with-zeromq=$HOME --includedir=$HOME/include/ --libdir=$HOME/lib/
./make
./make -n install
#to check to see if it installs it to the right location
make install