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.
Related
Good day,
I really spent almost all after-noon looking to install lua5.3 on Centos 7.
I mostly found information to install Lua5.1 but we really need a version 5.2 or 5.3.
If I found information for 5.3, it was not for Centos.
Until now, the best I could do, is to download the source version from lua web site
enter link description here
But I still can not install it.
Here are my steps, may be you can help to continue
curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz
tar zxf lua-5.3.4.tar.gz
cd lua-5.3.4
make linux test
The problem, from that point how can I install it.
I tried
make
and
make linux
make linux make me a fatal error
[root#pc6 lua-5.3.4]# make linux cd src && make linux make1:
Entering directory /root/install-package/lua-5.3.4/src' make all
SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" make[2]:
Entering directory/root/install-package/lua-5.3.4/src' gcc
-std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c lua.c:82:31: fatal error: readline/readline.h: No such
file or directory #include
^ compilation terminated. make[2]: * [lua.o] Error 1 make[2]: Leaving directory
/root/install-package/lua-5.3.4/src' make[1]: *** [linux] Error 2
make[1]: Leaving directory/root/install-package/lua-5.3.4/src' make:
* [linux] Error 2
So what do you suggest me to do. Centos 7 has been istalled today. May do I miss to install a dependent a library?
Thank for your help
The download page which you mention says:
There are detailed instructions in the package
This link points to the README, which says:
If you're running Linux and get compilation errors, make sure you have installed the readline development package (which is probably named libreadline-dev or readline-devel).
If you don't want to install readline, try make posix or make posix MYCFLAGS=-DLUA_USE_DLOPEN MYLIBS=-ldl instead. You may need to do make clean first.
If you are feeling lazy, the IUS repo has prebuilt packages of lua5.3 for el7 under the name lua53u (u presumably stands for "update") (and lua53u-devel, etc, depending on what you need).
Simply enable the repo and then install:
# enable repos
yum install -y epel-release https://repo.ius.io/ius-release-el7.rpm
# install
yum install -y lua53u
On my server with FreeBSD 10.0 I get the following error:
# make
/usr/bin/g++ crypto.cpp md4.cpp rsalib1.cpp base64.cpp cmdbase.cpp signer.cpp wmsigner.cpp -o wmsigner
make: exec(/usr/bin/g++) failed (No such file or directory)
*** Error code 1
Stop.
make: stopped in /tmp/wmsigner-2.0.3
/usr/bin/g++ doesn't exist, how do I install it/fix this?
gcc is still available in FreeBSD, under the ports. To install the latest version (as of this writing, 4.9) as a port, do the following:
cd /usr/ports/lang/gcc49/ && make install clean
If you want to install it as a package, do the following:
pkg install lang/gcc49
This will install the C, C++, Fortran and Java front ends as gcc49, g++49,
gfortran49, and gcj49, respectively.
It was renamed in FreeBSD 10. Fixed by creating symlink in /usr/bin:
g++# -> /usr/bin/clang++
Unfortunately I'm forced to use gcc-4.1 and I'm using debian wheezy. Since gcc-4.1 is not in repository I'm trying to build gcc from sources.
But I'm getting compiling error:
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux-gnu/crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux-gnu/crtn.o' is incompatible with i386 output
It looks that ld is picking wrong version of libraries, but I checked my /usr/lib32 and /usr/lib/x86_64-linux-gnu/ and it contains those files:
/usr/lib32/libc.a
/usr/lib32/libc.so
/usr/lib32/crtn.o
/usr/lib32/crti.o
/usr/lib/x86_64-linux-gnu/libc.a
/usr/lib/x86_64-linux-gnu/libc.so
/usr/lib/x86_64-linux-gnu/crtn.o
/usr/lib/x86_64-linux-gnu/crti.o
And ld should have access to them
~$ echo $LIBRARY_PATH
/usr/lib/x86_64-linux-gnu:/usr/lib32/
So I have no idea where the problem is.
I managed to work around the problem.
Run configure with:
./configure --disable-multilib ...
But than I encountered another problem with makeinfo, if you have newer version >=4.10 than it might not be found by configure. So simple fix in generated makefile worked for me:
Change this line:
MAKEINFO = /home/lecopivo/Downloads/gcc412/gcc412/gcc-4.1.2/missing makeinfo
To this:
MAKEINFO = makeinfo
I found this helpful.
LD_LIBRARY_PATH is only for running programs already linked.
You probably need to set LDFLAGS when you configure gcc:
./configure LDFLAGS="-L/usr/lib32" .....
It might be LDFLAGS_FOR_HOST or LIBS or something like that though.
I had this problem recently and finally solved it this way:
ln -s /usr/lib32 /usr/lib/i386-linux-gnu
Notes:
I assumed you do not have /usr/lib/i386-linux-gnu directory in your 64bit linux. If this directory exists and is empty, please delete it and make the above link.
If the directory already exists and is not empty, you have to make links inside it for (32bit) libraries which cause build error one by one; e.g.:
ln -s /usr/lib32/crti.o /usr/lib/i386-linux-gnu/crti.o
ln -s /usr/lib32/crtn.o /usr/lib/i386-linux-gnu/crtn.o
...
If 32bit development libraries are not installed, you may have to install them first. I've searched different forums and found that installing following set of packages in ubuntu will provide them:
libc6-dev libc6-dev-i386
gcc-multilib g++-multilib
zlib1g-dev lib32z1-dev
libncurses5-dev lib32ncurses5-dev libncursesw5-dev lib32ncursesw5-dev
Also adjust LD_LIBRARY_PATH and LIBRARY_PATH variables so that they contain /usr/lib/i386-linux-gnu and /usr/lib/x86_64-linux-gnu (i.e. multiarch lib-dirs). I am not sure which one of above variables is effective, so I adjust both of them the same.
If you use ./configure --disable-multilib as it is frequently suggested on web, though gcc will be built, but when you want to use that gcc for compiling e.g. legacy grub, you probably get error of "gcc cannot build executable" (or such).
Optionally, you can make similar linking for these pair of libdirs:
ln -s /lib32 /lib/i386-linux-gnu
Doing so, I managed to compile gcc-3.4.6 in a Ubuntu 16.04.6-amd64 used for compiling old 32bit programs like SDL 1.2 and legacy GRUB4DOS 0.4.4.
Also take a look at my answer to similar (though opposite) error here.
Good luck.
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.
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