Has anyone had any luck getting the Camellia computer vision library to install on OS X? I've been banging my head against a wall trying to get it to install. There is only one reference I can find online and it is a bit dated. I've followed the instructions to the T with no luck.
I'm hoping one of your brilliant folks on SO can help a dude out.
What exactly is your problem? Is there any error message? Are you trying to compile the library or are you trying to build the gem?
The sourcecode of the Camellia library is written in C. If you want to compile the library on your OS X machine you'll need a C compiler (like GCC). The easiest way to get one on OS X is by installing Apple's XCode because GCC is part of this package. You can check if you've GCC installed by entering the command which gcc in a Terminal window. If this command returns the path to the gcc application (like /usr/bin/gcc) you already have installed GCC. If the command returns nothing, you should install GCC (or XCode, as mentioned before).
After that, just follow the steps on the website you mentioned.
If that doesn't answer your question, please edit your request and be more specific about the problems and what you want to do.
I got it to run on Leopard with the following steps (already have Ruby, etc., set up - install XCode from the OS X installation DVD if you don't already have it):
Downloaded the Unix/Linux distribution (CamelliaLib-2.7.0.tar.gz)
Opened up the tarball
cd CamelliaLib-2.7.0/
./configure
sudo make
sudo make install
Cool, so that's Camellia installed. Next up for the Ruby part.
First, I looked for the gem with gem search -r camellia:
*** REMOTE GEMS ***
camellia (2.7.0)
camellia-rb (1.2)
Nice, so all it should take is a simple gem install.
$ sudo gem install camellia
ERROR: could not find gem camellia locally or in a repository
Weird. Anyway, I installed the other gem:
$ sudo gem install camellia-rb
And sure enough (you'll need to use require 'rubygems' first unless you've got a different setup like me):
$ irb
irb(main):001:0> require 'camellia'
=> true
Hope that gets you started.
Not good !!!
sudo gem install camellia-rb
is NOT the camellia graphics gem, it is a cypher gem, so still no good solution
the problem is getting the camellia graphics gem into os X leopard working, anyone else??
Download CamelliaLib-2.7.0.tar.gz
tar xf CamelliaLib-2.7.0.tar.gz
cd CamelliaLib-2.7.0
./configure
make
sudo make install
cd ..
Download camellia-2.7.0-x86-linux.gem from rubyforge
mkdir camellia-gem
cd camellia-gem
tar xvf ../camellia-2.7.0-x86-linux.gem
tar zxvf data.tar.gz
cd ext
modify extconf.rb as described
CONFIG['LDSHARED'] = "g++ -shared -lCamellia"
to
CONFIG['LDSHARED'] = "g++ -lCamellia -bundle -flat_namespace -undefined suppress"
ruby extconf.rb
if you have the default leopard install of ruby, modify topdir in the Makefile to
topdir = /usr/lib/ruby/1.8/universal-darwin9.0
remove "-Wl,-export-dynamic" from DLDFLAGS and "-Wl,-R'$(libdir)'" from LIBPATH
make sure that arch, sitearch and ruby are correct
remove -lcrypt from LIBS
arch = universal-darwin9.0
sitearch = universal-darwin9.0
ruby = /usr/bin/ruby
make sure LDSHARED change took in Makefile
LDSHARED = g++ -lCamellia -bundle -flat_namespace -undefined suppress
.so to .bundle for DLLIB
DLLIB = $(TARGET).bundle
make
sudo cp camellia.bundle /usr/lib/ruby/site_ruby/1.8/universal-darwin9.0
Related
I'm trying to compile a package called Kraken on my M1 Mac running Big Sur.
MacOS fails to compile: clang gets upset. I installed gcc from Homebrew (twice) and $ brew doctor says I'm ready to go.
My path is now:
/usr/local/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/opt/homebrew/bin.
The gcc-11 etc files exist at /opt/homebrew/bin
But /usr/local/bin does not exist!
MacOS does not update the command alias for gcc:
$ rm gcc
then
$ ln -s /opt/homebrew/bin/gcc-11 gcc
return no error
but then
$ which gcc
returns
/usr/bin/gcc
I'm lost and gather this compiler-pointing has been a mess; is there any new insight here? I've seen a bunch of entries but nothing I've tried has worked.
Hoping this is a stupid newbie (me) problem, I thank you for any help you can give.
Michael
Homebrew avoids linking binaries with the same name as system binaries like gcc(appleclang). ln -s /opt/homebrew/bin/gcc-11 /opt/homebrew/bin/gcc or tell your configurator to explicitly use gcc-11 via CC= etc. and the same for g++-11 if C++ is used.
If it's a ./configure script, you can try calling CC=/opt/homebrew/bin/gcc-11 CXX=/opt/homebrew/bin/g++-11 ./configure
if cmake then use cmake .. -DCMAKE_C_COMPILER=/opt/homebrew/bin/gcc-11 -DCMAKE_CXX_COMPILER=/opt/homebrew/gcc++-11
Also, try seeing where the homebrew gcc link points ls -l /opt/homebrew/bin/gcc
I am compiling OpenSSL libraries on macOS 10.15, but my application deployment target (which uses these OpenSSL libraries) is 10.12.
So, when I link these libraries with my application I get multiple errors like this:
ld: warning: object file (.../libcrypto.a) was built for newer OXS version (10.15) than being linked (10.12)
The question is:
how to compile OpenSSL to be linked with specific deployment target (in my case it is 10.12)?
When compiling OpenSSL I am trying to configure it like this:
$ ./configure darwin64-x86_64-cc --prefix=/Users/username/openssl --openssldir=/Users/username/openssl/ssl -mmacosx-version-min=10.12
but this does not help.
Ok, I did not execute the command:
$ make distclean
at the end of my previous compilation.
So, it should look like this:
$ ./configure darwin64-x86_64-cc --prefix=/Users/username/openssl --openssldir=/Users/username/openssl/ssl -mmacosx-version-min=10.12
$ make depend
$ make install
$ make distclean
Then all temporary files will be deleted and next compilations with modified sittings will work.
I installed gcc version 5.1 locally on a cluster having OS as CentOS where I dont have root access (so i cant use any commands like 'sudo'). (The global gcc version installed is 4.4). I also modified the path variable to include the path to my local version at the beginning of the path variable. Before, when I was trying to install boost using the global version, it worked fine. But now, when I try to install boost, it shows the following error:
/users/home/head/cmp/soft/sft/gcc/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
Any ideas on how to fix this will be highly appreciated.
Follow the instructions at https://gcc.gnu.org/wiki/InstallingGCC
Specifically, don't install ISL manually in some non-standard path, because GCC needs to find its shared libraries at run-time.
The simplest solution is to use the download_prerequisites script to add the GMP, MPFR, MPC and ISL source code to the GCC source tree, which will cause GCC to build them for you automatically, and link to them statically.
I have the same issue. I solved it as follows:
Download the source code of isl available here
Unzip and install: ./configure && make && make install
cp /usr/local/lib/libisl* /usr/lib
Note: a symlink also works:
$ cd /usr/lib
$ ln -s /usr/local/lib/libisl.so.10 libisl.so.10
You can do the same in Debian distros:
apt-get install libisl-dev
Adjust the references of shared libs:
$ cp /usr/local/lib/libisl* /usr/lib
Note: a symlink also works:
$ cd /usr/lib
$ ln -s /usr/local/lib/libisl.so.10 libisl.so.10
On OS X I'm trying to install the zlib prerequisite for haskell's Cabal. I get this error:
$ sudo ./Setup build
Preprocessing library zlib-0.5.0.0…
ld: library not found for -lgmp
collect2: ld returned 1 exit status
linking dist/build/Codec/Compression/Zlib/Stream_hsc_make.o failed
command was: /usr/bin/gcc -lz -L/sw/lib/ghc-6.8.3/lib/bytestring-0.9.0.1.1 -L/sw/lib/ghc-6.8.3/lib/array-0.1.0.0 -L/sw/lib/ghc-6.8.3/lib/base-3.0.2.0 -L/sw/lib/ghc-6.8.3 -lm -lgmp -ldl dist/build/Codec/Compression/Zlib/Stream_hsc_make.o -o dist/build/Codec/Compression/Zlib/Stream_hsc_make
The library -lgmp is found in /sw/lib, so I can run that command ("/usr/bin/gcc ...") successfully if I manually add -L/sw/lib. The problem is that sudo doesn't know about /sw/lib. Behold:
$ gcc -print-search-dirs | grep sw
libraries: =/lib/i686-apple-darwin9/4.0.1/:/lib/:/usr/lib/i686-apple-darwin9/4.0.1/:/usr/lib/:./i686-apple-darwin9/4.0.1/:./:/sw/lib/i686-apple-darwin9/4.0.1/:/sw/lib/:/usr/lib/gcc/i686-apple-darwin9/4.0.1/:/usr/lib/gcc/i686-apple-darwin9/4.0.1/:/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../i686-apple-darwin9/lib/i686-apple-darwin9/4.0.1/:/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../i686-apple-darwin9/lib/:/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1/:/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../
$ sudo gcc -print-search-dirs | grep sw
$
How do I tell the sudo version of gcc to look in /sw/lib for libraries? Do I add an environment variable on root's .bash_profile? If so, which one?
UPDATE:
There’s probably a more proper way to do this, but here’s what worked. I created a bash script with this in it:
#!/bin/sh
export LIBRARY_PATH=/sw/lib:$LIBRARY_PATH
./Setup build
And then I ran
$ sudo ./script.sh
That compiled zlib without complaining - hooray! Unfortunately cabal-install is still giving me the error:
$ ./Setup configure
Configuring cabal-install-0.6.2…
Setup: At least the following dependencies are missing:
zlib >=0.4 && <0.6
So I went back to the cabal-install dir (which is what I'm trying to do in the first place), and ran...
$ ./bootstrap.sh
...and that installed everything as expected.
Why you use sudo ever? You should not compile as super user. Compile as normal user and install as super user.
Try setting LDFLAGS=-L/sw/lib.
GHC now comes with an installer for OS X (Leopard, not sure about Tiger). The only issue is that if you use macports or fink, these will probably not see that you have GHC installed and try to install their own version of it.
I recently discovered Ruby Shoes, which sounds rather useful for a beginner like me. The only the problem is that my laptop is x64, while the only Linux package is i686. I tried it anyway and it didn't work for me, I kept getting an error. I didn't expect it to work, of course, but is there still a way to get Shoes on x64 Linux? Thanks!
There doesn't appear to be a 64-bit package for Linux, so if your distro doesn't package shoes you'll need to compile it yourself. This isn't as scary as it sounds!
First, make sure you have the proper development libraries:
Shoes relies on Cairo, Pango, libungif, libjpeg, GTK+ 2.0, and Ruby,
as well as GCC and its linker.
To install all of these libraries on Ubuntu or Debian:
# aptitude install libcairo2-dev libpixman-1-dev libpango1.0-dev \
libungif4-dev libjpeg62-dev libgtk2.0-dev vlc libvlc-dev \
libsqlite3-dev libcurl4-openssl-dev ruby1.8-dev rake
(On Ubuntu older than 8.10, actually you'll need libvlc0-dev.)
To install these libraries on Fedora:
# yum install -y giflib-devel cairo-devel libpixman-devel \
pango-devel libjpeg-devel gtk2-devel sqlite-devel vlc-devel \
libcurl-devel ruby-devel
I can get more specific if I knew what distribution you're using. Once you're ready, grab the tarball from shoooes.net and unpack it.
Then, enter the directory and run
make
this will build the project. Assuming this completes successfully, run
make install
If you need further help compiling this, consider joining the mailing list
Send a message to shoes AT code.whytheluckystiff.net
Cc: why AT whytheluckystiff.net
or #shoes on irc.freenode.net
I'm using Fedora Core 10. Here's what I get when I attempt building it.
$ ~/shoes-0.r1134
bash: /home/Alex/shoes-0.r1134: is a directory
$ make
make: *** No targets specified and no makefile found. Stop
Alternatively...
$ make shoes-0.r1134
make: Nothing to be done for `shoes-0.r1134'.
Also, I've looked in the repo's, and Ruby Shoes isn't in it.
I tried the instructions above. I got
[nathan#ebisu ~/tmp/shoes-0.r1134] make
build options: shoes raisins (0.r1134) [x86_64-linux]
CC = cc
RUBY = /usr
OPTIONS =
CC shoes/app.c
CC shoes/canvas.c
CC shoes/effects.c
CC shoes/image.c
CC shoes/internal.c
CC shoes/ruby.c
CC shoes/world.c
CC shoes/native/gtk.c
CC shoes/http/curl.c
CC -o dist/libshoes.so
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for -ljpeg
CC bin/main.c
CC -o dist/shoes-bin
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for -ljpeg
cp: cannot stat `/usr/lib/libruby.so': No such file or directory
make: *** [dist/shoes.launch] Error 1
Obviously I do have libjpeg installed.