Trouble installing/compiling lua on macosx - macos

I have been attempting to compile/install Lua on Snow Leopard. I have changed the target platform in the Makefile.std to macosx and I still get the following issue:
sudo make -f Makefile.std macosx
make[1]: *** No rule to make target 'macosx'. Stop
make: *** [macsox] Error 2
I also changed the target of the same Makefile.std file in the src directory.
Is there something I'm missing here?
I have tried "make macosx" amongst other variations...
This should be easy.

Did you download the source from lua.org? The official distribution does not contain a Makefile.std. Doing "make macosx" should just work. Get the official tarball.

Note also that there are Lua packages in MacPorts and Fink.

Related

Error installing libmaxminddb

I am trying to install the GEolite2 database on a netbsd server. I can't get past the first make for libmaxmindb. I get the following error;
make all-recursive
Making all in src
Making all in bin
Making all in t
make: don't know how to make man/man1/*.1. Stop
make: stopped in /usr/local/maxmind/libmaxminddb-1.1.1
*** Error code 1
Stop.
make: stopped in /usr/local/maxmind/libmaxminddb-1.1.1
*** Error code 1
Stop.
make: stopped in /usr/local/maxmind/libmaxminddb-1.1.1
Hpw can I either fix this or get around it?
UPDATE:
I downloaded the tarball for 1.1.1 from github.com/maxmind/libmaxminddb/releases/download/1.1.1/….
I noticed that the man directory has no Makefile in it and from what I could tell, maybe it should.
I am using NetBSD 6.0.1 and ran the steps in the Readme.
configure - ran normally
make - failed as shown above. –
I also tried starting from a git clone - same result.
On BSD systems one should always use GNU Make with Makefiles generated by GNU Automake.
I see in README.md for the libmaxminddb repository on github.com that one is expected to run the bootstrap script after cloning the repo (which is quite normal, though more often the script is called autogen).
If you don't already have GNU Make and the GNU Autotools installed I recommend using pkgsrc to install them.

XCode and gcc errors

So, I feel like my xcode/gcc/however they are supposed to work together has been broken for a while. Trying to download various technologies (most recently redis) has always ended in sadness. When I tried to make the redis I get
-bash-3.2$ make
cd src && make all
LINK redis-server
/bin/sh: gcc-4.6: command not found
make[1]: *** [redis-server] Error 127
make: *** [all] Error 2
This is the kind of error I've been gettng forever. For reference, I'm running Mac 10.7.5, my latest xcode is 4.6 and my latest gcc is 4.2. Any ideas on how I can make this work? I'd rather not upgrade my Mac OS if possible. Thanks!
I honestly don't know if this is the right way to fix this, but this issue became so problematic for me that I was willing to try anything. I noticed that I definitely had a
/usr/bin/gcc
file. And I notice that my system couldn't find the /gcc-4.6.
So.... I just did one of these numbers
sudo cp /usr/bin/gcc /usr/bin/gcc-4.6
and voila. It works now. Now I can do it all, including essential tasks like compiling any C code. So, hopefully this helps someone out.

Install OpenSSL Support for self-compiled Ruby Installation

I unpacked and compiled Ruby 2.1 and installed several support tools.
But OpenSSL won't install while I have libssl-dev installed.
I get this error when making the openssl support:
make: *** No rule to make target `/thread_native.h', needed by `ossl.o'. Stop.
What to do?
I ran into the same problem. Turns out, the last line of the extconf.rb-generated Makefile reads
ossl.o: $(top_srcdir)/thread_native.h $(top_srcdir)/thread_$(THREAD_MODEL).h
However, top_srcdir isn't defined anywhere in the Makefile.
I figured out where the missing header files were by running
sudo find / -name thread_native.h
which returned (approximately)
~/.rbenv/versions/2.1.0/thread_native.h
There's a line at the top that says something like
topdir = ~/.rbenv/versions/2.1.0/include/ruby-2.1.0
so I just added a line below it pointing to the directory from the find:
top_srcdir = $(topdir)/../..
After all that, I did a make clean in the ext/openssl directory and then make ran without the error.
Why don't you use rvm? It compiles, configures, installs and manages the chosen version of the most popular ruby interpreters for you.
Anyway, try using --with-openssl-dir.

xcode/perlbrew & building CPAN modules - make options? SDKs? Getting build errors

I'm brand new to OSX, but have been using UNIX/Linux for decades. Just got a new MBP Retina running latest OSX 10.8.1.
installed fink
installed perlbrew
installed xcode
All's well, except I can't get a lot of CPAN modules to build. I am guessing I need to add some magic xcode SDK to get needed libs?
Here's an example:
$ cpanm Wx
...
make[2]: *** No rule to make target `/Users/dfelicia/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1/darwin-thread-multi-2level/CORE/cc_runtime.h', needed by `RichText.o'.
Stop.
make[1]: *** [subdirs] Error 2
make: *** [subdirs] Error 2
Regardless of the module that fails to build (and there are many), the failure is always with cc_runtime.h.
What am I missing?
I built perl 5.16.2 using the perlbrew arguments from here: http://wiki.wxperl.info/w/index.php/Mac_OS_X_Platform_Notes
Ah ha. I figured out that fink was injecting its perl into the shell env (PERL5LIB, PERLHOME, #INC, etc.). How annoying. I ditched fink and am using Mac Ports, instead.
Anyhow, with a clean env I am able to build everything.
Guesswork on my side as I've never really gotten into OSX:
Have you tried installing MakeMaker as suggested here? Sounds like it could make sense if you have a lot of failures.
CPAN should do that for you though...

Help using Simple Vector Library (SVL) with Xcode

I am writing a small program using openGl and SDL. I need to use SVL for various reasons but I cannot get it to link up properly in Xcode. Has anyone done this before and could talk me through it? I followed the readme from SVL and get the following when I run make install:
ip-156-133:svl-1.5 2 Tom$ sudo make install
installing into /usr/local/include/svl /usr/local/doc
done.
installing into /usr/local/lib /usr/local/include
chmod: lib/*: No such file or directory
make: [install-libs] Error 1 (ignored)
cp: lib/*: No such file or directory
make: [install-libs] Error 1 (ignored)
done.
Could be this be part of the problem?
Also I'm not sure where to add the -lsvl flag and -lsvl.dbg etc.
Any help would be greatly appreciated.
Thanks
SVL seems rather unmaintained, given that the latest version is nearly eight years old.
I'd recommend Eigen, which is under active development and has the added benefit of being a header-only library.

Resources