Compile Errors

Posted by Trido09 on Sun 22 Mar 2009 10:15 PM — 5 posts, 27,308 views.

#0
I am running Ubuntu 8.10 server.

gcc (Ubuntu 4.3.2-1ubuntu12) 4.3.2
GNU Make 3.81

I downloaded (From the PennMUSH download server) Pennmush 1.8.2p1 with Aspace 1.2.1. I extracted it using tar -xvvzf and it put it into a folder called pennmush in the same level directory I saved the archive.

I read the READMEs which said to make Aspace first so I went into the Aspace folder and typed 'make' and got errors and a failed compile. The error I received was:

gcc -I. -I.. -I../hdrs -DPENNMUSH -DASPACE -g -w -c space_alert.c -o obj/space_alert.o
In file included from ../hdrs/conf.h:13,
from space.h:27,
from space_alert.c:4:
../hdrs/mushtype.h:10:25: error: openssl/ssl.h: No such file or directory
In file included from ../hdrs/conf.h:13,
from space.h:27,
from space_alert.c:4:
../hdrs/mushtype.h:138: error: expected specifier-qualifier-list before âSSLâ
make: *** [obj/space_alert.o] Error 1

Anyone have any ideas? Why am I getting a No such file or directory for the openssl?

When I check mushtype.h, I can see the lines it is speaking of:

#ifdef HAS_OPENSSL
#include <openssl/ssl.h>

When it says to include openssl/ssl.h, does that mean that this file should be within the pennmush directory, or does it find it elsewhere on the server?

FYI, OpenSSL is installed to the current version (At least Ubuntu says so anyway):

OpenSSL 0.9.8g 19 Oct 2007

Can anyone help me with this issue? Does anyone need further info?
#1
I just ran a ./configre and went through all the options and it said that I don't seem to have openssl when I know I do. Anyone know why this may be?
USA #2
There tends to be a separation between the library and the development version of the library. I'd suggest looking for libopenssl-dev or something like that -- that might be what it's looking for.
Australia Forum Administrator #3
Quote:

When it says to include openssl/ssl.h, does that mean that this file should be within the pennmush directory, or does it find it elsewhere on the server?



Apparently, by default, gcc searches the following directories for header files:


/usr/local/include/
/usr/include/


Now if you say:


#include <openssl/ssl.h>


I would suggest it would look for ssl.h in:


/usr/local/include/openssl/
/usr/include/openssl/



Possibly it will also look in a subdirectory (openssl in your case) of the directory the compiling is being done in, although usually you would write this if you wanted that to happen:


#include "openssl/ssl.h"


I would check that the file is in /usr/local/include/ or /usr/include/. I would guess that third party installers would tend to use /usr/local/include/ as that installation would be "local" to that particular machine.

#4
Thanks for that. It gives me a good place to start.