Error installing libmaxminddb - makefile

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.

Related

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.

Compile error from gmake, but single line runs fine

I'm editing a makefile with multiple targets, using the Unity unit testing framework. Pressing the "Build" button in Code Composer Studio runs through fine until the following line
$(C_COMPILER) $(INC_DIRS) $(SRC_FILES1) -o $(TARGET1)
Also in the makefile are the following lines:
C_COMPILER=C:\MinGW\bin\mingw32-gcc.exe
UNITY_ROOT=../test/unity/
UNITY_C=$(UNITY_ROOT)unity.c
UNITY_H=$(UNITY_ROOT)unity.h
INC_DIRS=-I../include/ -I$(UNITY_ROOT)
SRC_FILES1=$(UNITY_C) ../source/ProductionCode.c ../test/TestProductionCode.c ../test/test_runners/TestProductionCode_Runner.c
TARGET_BASE1=test1
TARGET_EXTENSION=.out
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
And when building in Code Composer, this is the error that is displayed
C:\MinGW\bin\mingw32-gcc.exe -I../include/ -I../test/unity/ ../test/unity/unity.c ../source/ProductionCode.c ../test/TestProductionCode.c ../test/test_runners/TestProductionCode_Runner.c -o test1.out
gmake[1]: *** [default] Error 1
gmake[1]: Leaving directory `C:/Users/matt.harding/Documents/SubversionDirectories/pt_listen_only_can_interface/sw/ccs6_workspace/makefile_project_test1/Debug'
gmake: *** [all] Error 2
So I opened up Cygwin and tried it there to see if I could find the cause. Entering just this problem line, it ran perfectly fine and generated the target successfully! So I'm not sure what would be the problem in Code Composer...
Any ideas? Thanks!
EDIT: If I run the same makefile with gmake in cygwin, it displays the same error as in CCS. So... why is there a problem running this with gmake rather than just running the compiler from Cygwin?
EDIT: From what I can gather, it looks like a compiler incompatibility between Windows and Cygwin? If I change the compiler in the makefile to
C_COMPILER=C:\cygwin\bin\gcc.exe
There is still a problem when running the makefile from Code Composer, but running gmake all works perfectly in Cygwin!
So I found a solution to my problem.
I changed the compiler to
C_COMPILER=C:\MinGW\bin\gcc.exe
Still didn't work in Code Composer Studio (CCS)
I added C:\MinGW\bin\ to the system PATH.
Still didn't work in CCS.
I closed and reopened CCS after having added MinGW to the system PATH.
SUCCESS!
I don't fully understand why things didn't work why I expected them to, but at least we have a solution.

Not able to install padwalker on osx 10.6.8

I want to install padwalker on my mac so that i can use it in eclipse(helios)
$ make -version is 3.81
Installing PadWalker from cpan & directly via the make command gives me the following error
PadWalker.xs: In function ‘fetch_from_stash’:
PadWalker.xs:179: warning: format not a string literal and no format arguments
lipo: can't open input file: /var/folders/xB/xBJ-fz33GWibK4FbV4AAwk+++TI/-Tmp-//ccl9TEXl.out (No such file or directory)
make: *** [PadWalker.o] Error 2
ROBIN/PadWalker-1.98.tar.gz
/usr/bin/make -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
ROBIN/PadWalker-1.98.tar.gz : make NO
I am sorry but i really looked over the web for answers but have not found any.
Someone suggested to use cpanm, but that too is of no use
I got a dirty trick.
With cpan, i am still not able to install it.
However i downloaded PadWalker-1.98.tar.gz
Opened Makefile.PL and removed the line MIN_PERL_VERSION => "5.008001",
I did $ perl Makefile.PL
With reference to https://rt.cpan.org/Public/Bug/Display.html?id=69506
I opened the generated Makefile & removed all instances of '-arch ppc' in Makefile.
finally
$make
&
$make install
Now i am able to view the local variables in eclipse

Building and using Google Protocol Buffers

I am currently working on a project, and I am trying to implement Protocol Buffers to work as a serialization format to store data on the local computer, and then be read back at a later time. Some of the features of protocol buffers seem perfect for this project so I was eager to test it out but I have run into some issues.
So far though, I have not even been able to get far enough to test out Protocol Buffers. I downloaded the most recent zip file (version 2.4.1) to my windows machine. I read through the install.txt located in the root of the folder, but it was for Unix based systems. I then saw that it came with a vsprojects folder and read through the instructions listed there. Basically, all I was told to do was open up a solution, and then build the entire solution in either Debug or Release. I instantly received several errors about "config.h" not being found.
I checked over the Unix instructions again and step one was...
cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system. If you're
usingcsh' on an old version of System V, you might need to type
sh ./configure' instead to preventcsh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
So I booted into ubuntu, which I rarely use, and tried follow these instructions. The step listed above went fine and I was even able to get to the next step and 'make' the project, but then when the time came to use 'make install' I received the following errors:
ross#ubuntu:~/Desktop/protobuf-2.4.1$ make install
Making install in .
make[1]: Entering directory `/home/ross/Desktop/protobuf-2.4.1'
make[2]: Entering directory `/home/ross/Desktop/protobuf-2.4.1'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/bin/mkdir: cannot create directory `/usr/local/lib/pkgconfig': Permission denied
make[2]: *** [install-pkgconfigDATA] Error 1
make[2]: Leaving directory `/home/ross/Desktop/protobuf-2.4.1'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/ross/Desktop/protobuf-2.4.1'
make: * [install-recursive] Error 1
I primarily use windows for development, and the entire project I am working with now is being made in windows, so I am a little concerned. Has anybody had any luck building Protocol Buffers in either windows or linux?
Thank you
You can't do make install as your own user, when you're trying to install it system-wide.
Either use sudo make install if you have sudo rights, or become root any other possible way and then run it.
If you don't have admin rights, you can run ./configure --prefix=$HOME/protobuffers, compile and run make install again, it will install them in your home dir in subdir called protobuffers. Note that you might want to adjust your LD_LIBRARY_PATH in profile after that to be able to find libraries. If you only need protoc, that should do the trick.
--- edit ---
Speaking of which, protoc is also available for windows, and you can use them there as well.
You can download it here.

Trouble installing/compiling lua on macosx

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.

Resources