View previous topic :: View next topic |
Author |
Message |
TalonHawk
Joined: 13 Mar 2005 Posts: 3
|
Posted: Sun Mar 13, 2005 8:37 Post subject: FreeBSD 5.3 STABLE Compile? |
|
|
Running linux_base-8-8.0_6
root@TalonHawk# ./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for fcntl.h... yes
checking for netinet/in.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/ioctl.h... yes
checking for sys/mman.h... yes
checking for sys/socket.h... yes
checking for sys/time.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for working malloc... yes
checking for bzero... yes
checking for getspnam... no
checking for inflateEnd in -lz... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating db/Makefile
config.status: creating mnx/Makefile
config.status: creating functions/Makefile
config.status: creating hashset/Makefile
config.status: creating config.h
root@TalonHawk# make
g++ -O2 -pipe -march=pentium4 -c nwnx2lib.cpp
g++ -O2 -pipe -march=pentium4 -c NWNXBase.cpp
g++ -O2 -pipe -march=pentium4 -c gline.cpp
g++ -w -fPIC -shared -W -Wall -o nwnx2.so -ldl -DHAVE_CONFIG_H
/usr/bin/ld: cannot find -ldl
*** Error code 1
Stop in /usr/NWNX2/linnwnx2.
.... help anyone? |
|
Back to top |
|
|
NoMercy
Joined: 03 Jan 2005 Posts: 123 Location: UK
|
Posted: Sun Mar 13, 2005 15:19 Post subject: |
|
|
I'm not entirely sure what this means on FreeBSD, it's asking for libdl.so the runtime linker part of the linux ld package, if it exists on your system but in a non-standard path you might want to try -L/non/standard/path by editing the makefile, near the top:
LIBS = -ldl -L/non/standard/path
If it's not on your system at all, then you have a bigger problem :) |
|
Back to top |
|
|
TalonHawk
Joined: 13 Mar 2005 Posts: 3
|
Posted: Thu Apr 07, 2005 10:49 Post subject: |
|
|
After messing with the lib files and the path in the Makefile...
g++ -w -fPIC -shared -W -Wall -o nwnx2.so -ldl -L /usr/compat/linux/lib/ -DHAVE_CONFIG_H
make -C db
g++ -O2 -pipe -march=pentium4 -c NWNXmysql.cpp
In file included from NWNXmysql.cpp:20:
NWNXmysql.h:16:21: db/data.h: No such file or directory
NWNXmysql.h:17:24: db/dbmysql.h: No such file or directory
NWNXmysql.h:19:22: NWNXBase.h: No such file or directory
In file included from NWNXmysql.cpp:20:
NWNXmysql.h:22: error: expected class-name before '{' token
NWNXmysql.h:27: error: expected `;' before '(' token
NWNXmysql.h:36: error: ISO C++ forbids declaration of `Data' with no type
NWNXmysql.h:36: error: expected `;' before '*' token
NWNXmysql.cpp: In constructor `CNWNXmysql::CNWNXmysql()':
NWNXmysql.cpp:23: error: `confKey' undeclared (first use this function)
NWNXmysql.cpp:23: error: (Each undeclared identifier is reported only once for each function it appears in.)
NWNXmysql.cpp: In member function `bool CNWNXmysql::ClientClose(const char*)':
NWNXmysql.cpp:30: error: `db' undeclared (first use this function)
NWNXmysql.cpp: In member function `bool CNWNXmysql::ClientInit(const char*, const char*)':
NWNXmysql.cpp:37: error: `ConnParam' undeclared (first use this function)
NWNXmysql.cpp:37: error: expected `;' before "dbParam"
NWNXmysql.cpp:39: error: `nwnxConfig' undeclared (first use this function)
NWNXmysql.cpp:39: error: `confKey' undeclared (first use this function)
NWNXmysql.cpp:40: error: `dbParam' undeclared (first use this function)
NWNXmysql.cpp:45: error: `db' undeclared (first use this function)
NWNXmysql.cpp:45: error: `DbMySql' has not been declared
NWNXmysql.cpp:46: error: `Log' undeclared (first use this function)
NWNXmysql.cpp:56: error: `debuglevel' undeclared (first use this function)
NWNXmysql.cpp:58: error: `DBG_YES' undeclared (first use this function)
NWNXmysql.cpp:58: error: `m_fFile' undeclared (first use this function)
NWNXmysql.cpp: At global scope:
NWNXmysql.cpp:67: error: `bool CNWNXmysql::OnCreate' is not a static member of `class CNWNXmysql'
NWNXmysql.cpp:67: error: `gline' was not declared in this scope
NWNXmysql.cpp:67: error: `config' was not declared in this scope
NWNXmysql.cpp:67: error: expected primary-expression before "const"
NWNXmysql.cpp:68: error: initializer expression list treated as compound expression
NWNXmysql.cpp:68: error: expected `,' or `;' before '{' token
NWNXmysql.cpp: In member function `char* CNWNXmysql::OnRequest(char*, char*, char*)':
NWNXmysql.cpp:86: error: `Log' undeclared (first use this function)
NWNXmysql.cpp:99: error: `db' undeclared (first use this function)
NWNXmysql.cpp: In member function `bool CNWNXmysql::OnRelease()':
NWNXmysql.cpp:116: error: `CNWNXBase' has not been declared
*** Error code 1
Stop in /usr/downloads/linnwnx2-beta5.1-pre4.tar.gz_FILES/linnwnx2/db.
*** Error code 1
Stop in /usr/downloads/linnwnx2-beta5.1-pre4.tar.gz_FILES/linnwnx2.
I also tried this in the release version as well as the Beta... |
|
Back to top |
|
|
TalonHawk
Joined: 13 Mar 2005 Posts: 3
|
Posted: Tue Apr 12, 2005 10:29 Post subject: ....anyone? |
|
|
Still looking for help... |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Apr 12, 2005 12:41 Post subject: |
|
|
Those files are one directory up, not sure how to do that do. Wasn't there a makefile in the directory that automatically builds the stuff? |
|
Back to top |
|
|
dms
Joined: 15 Jun 2005 Posts: 3
|
Posted: Wed Jun 15, 2005 16:18 Post subject: |
|
|
Did you ever get this to work?
I'm also failing to get it to compile under freebsd and was hoping someone could either get me foolproof instructions or a binary file.... |
|
Back to top |
|
|
Gef
Joined: 28 Jun 2005 Posts: 2
|
Posted: Sat Jul 02, 2005 6:17 Post subject: |
|
|
In the Makefile change:
CXX = g++
To:
CXX = /usr/compat/linux/usr/bin/g++
If you get errors like:
NWNXmysql.h:16:21: db/data.h: No such file or directory
The you'll probably have to change the Makefile's in the sub-dirs so the FLAGS specifically include the source dir:
FLAGS = -I /(nwnx source dir) -I . -I .. -I /usr/local/include -w -fPIC -shared -W -Wall
If that doesn't help, you can change the include files to have a ../ prefix, just keep compiling and fixing each include error as you go; like the above error, use 'vi +16 db/NWNXmysql.h' and change the include line to read like this:
#include "../db/data.h"
Cheers,
- Gef |
|
Back to top |
|
|
dms
Joined: 15 Jun 2005 Posts: 3
|
Posted: Wed Jul 20, 2005 22:59 Post subject: |
|
|
bah I feel like a complete noob now... but I don't have g++ installed in with the linux compatibility and I can't see it in the Freebsd ports collection... is there a simple method of d/l it? (i'm not familar with other linux flavours and rpms etc) |
|
Back to top |
|
|
|