View previous topic :: View next topic |
Author |
Message |
reverett
Joined: 28 Jul 2008 Posts: 3
|
Posted: Mon Jul 28, 2008 21:04 Post subject: another make install issue |
|
|
I have Fedora 9 installed and am having issues with make install. I have run into several issues and keep installing things I need but this one does not give me anything to install.
Here is the issue I am having:
[root@nwnserver linnwnx2]# make install
g++ -g -mcpu=i386 -c -o nwnx2lib.o nwnx2lib.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
nwnx2lib.cpp: In function 'void Configure()':
nwnx2lib.cpp:362: warning: deprecated conversion from string constant to 'char*'
nwnx2lib.cpp:369: warning: deprecated conversion from string constant to 'char*'
nwnx2lib.cpp:374: error: 'atoi' was not declared in this scope
nwnx2lib.cpp:379: error: 'atoi' was not declared in this scope
make: *** [nwnx2lib.o] Error 1
Anyone have an idea? Do I need to run the configure command with some different flags??
Thanks, |
|
Back to top |
|
|
atika
Joined: 12 Apr 2008 Posts: 4 Location: Seattle
|
Posted: Tue Jul 29, 2008 3:36 Post subject: |
|
|
Reverett, I sent you a pm on this.
If I recall correctly, my server didn't have some libraries installed. I did a minimal install when I built the server. I pm'd you what I remember. |
|
Back to top |
|
|
dav999
Joined: 02 Jul 2009 Posts: 4
|
Posted: Fri Jul 10, 2009 10:49 Post subject: |
|
|
Scuse, can u post the solution? |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 2:32 Post subject: |
|
|
Please do. I've run into this problem running ArchLinux, and there doesn't seem to be any way around it. If there's someone who can help fix this, I would greatly appreciate it. If nobody can, thanks anyway. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 4:31 Post subject: |
|
|
Okay, after some searching, I found this thread:
http://www.nwnx.org/phpBB2/viewtopic.php?t=1333
It says that virusman had a different NWNXBase.h file to use. That was the only thing I could find that's even close to a fix (posted Apr 18, 2009 ), so I tried it. I put that into the linnwnx2 folder and wound up with this error:
Code: |
$ sudo make install
Password:
Makefile:21: target `db' given more than once in the same rule.
g++ -mcpu=i386 -c -o nwnx2lib.o nwnx2lib.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
In file included from nwnx2lib.cpp:41:
NWNXBase.h:11: error: stray \342 in program
NWNXBase.h:11: error: stray \200 in program
NWNXBase.h:11: error: stray \223 in program
In file included from nwnx2lib.cpp:41:
NWNXBase.h:70: error: stray @ in program
In file included from nwnx2lib.cpp:41:
NWNXBase.h:92:97: error: too many decimal points in number
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:147:67: error: too many decimal points in number
In file included from nwnx2lib.cpp:41:
NWNXBase.h:1: error: expected unqualified-id before < token
make: *** [nwnx2lib.o] Error 1
|
It's my bet that the .h file is incompatible and that nwnx won't compile on some Linux distributions. The README file included with the Linux version makes a lot of assumptions that can't be nailed down, so it might require a detailed list of all required packages that it needs to compile with.
ArchLinux 32-bit
gcc 4.4.2-3
NWN 1.69
MySQL 5.1.39-1
Additional information:
zlib-1.2.3.3-i686
make 3.81-4
autoconf 2.64-1
NWN server running from /home/<user>/nwnserver.
I used the following command to compile:
Code: |
$ ./configure --prefix=/home/<user>/nwnserver --with-extraplugins="db"
|
There isn't enough specific information in the documentation to know how to set the plugins, so I have to assume the 'db' is the plugin for MySQL support as that was what was in the db folder. Using ODBC as a plugin name doesn't work even with the .so file in the nwnx folder during configure.
Last edited by 12o on Tue Nov 17, 2009 18:49; edited 1 time in total |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 18:46 Post subject: |
|
|
Okay, I spent a few hours on this and I think I'm getting close to a solution.
Some other items I noticed after the fact:
install.sh is completely empty save for:
That's it. Nothing else. I tried downloading the package three times last night, and all results were the same.
It looks like the program tanks when searching for nwnx2lib.o. After searching the package, I realized that the file isn't included in the download. I do see the nwnxlib.cpp file in the install directory; however, it looks like the object file is not being created accordingly. Since the 'make' command is seeking out the object file and doesn't find it, I would say that its the ./configure file that is supposed to create the object from the .cpp file.
I'm still a bit new to Linux and not a programmer, but looking at this from a logical point of view, there must be some way to build the object files from the .cpp files without using the .configure process. Are there any programmers who might know how to do this?
I'm also working under the assumption that 'linnwnx2-2.5.3-rc1.tar.gz' includes the core and all plugin files all in one bundle. The website doesn't make this clear, so I'm sort of left wondering. If this package isn't working, then its safe to say that I need more. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 19:44 Post subject: |
|
|
Just in case this helps and anyone here can possibly help, here are the results of the compiling.
Code: |
$ ./configure --prefix=/home/<user>/nwnserver --with-extraplugins="db"
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
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 grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... 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... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for bzero... yes
checking for getspnam... yes
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 db/Makefile
config.status: creating config.h
|
And it seems to finish correctly. Everything reports 'yes', so there isn't any missing libraries that I can see.
But then, using either 'make', 'make install', or 'sudo make install' (every combination comes out the same):
Code: |
make
Makefile:21: target `db' given more than once in the same rule.
g++ -mcpu=i386 -c -o nwnx2lib.o nwnx2lib.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
nwnx2lib.cpp: In function void Configure():
nwnx2lib.cpp:362: warning: deprecated conversion from string constant to char*
nwnx2lib.cpp:369: warning: deprecated conversion from string constant to char*
nwnx2lib.cpp:374: error: atoi was not declared in this scope
nwnx2lib.cpp:379: error: atoi was not declared in this scope
make: *** [nwnx2lib.o] Error 1
|
I thought it might have something to do with the '-mcpu=i386' part since I'm compiling on an i686 machine, but changing that resulted in the same error. So it's changed back to i386.
Also, I checked the permissions folders and everything is as it's supposed to be. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 20:23 Post subject: |
|
|
Okay, I think I'm getting a bead on this thing. I found a thread that didn't come up in a previous search:
http://www.nwnx.org/phpBB2/viewtopic.php?t=1125&highlight=atoi
I followed the instructions to the letter, and the make is getting further. Now I'm getting this:
Code: | make
Makefile:21: target `db' given more than once in the same rule.
g++ -mcpu=i386 -c -o NWNXBase.o NWNXBase.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
In file included from NWNXBase.cpp:22:
NWNXBase.h:11: error: stray \342 in program
NWNXBase.h:11: error: stray \200 in program
NWNXBase.h:11: error: stray \223 in program
In file included from NWNXBase.cpp:22:
NWNXBase.h:70: error: stray @ in program
In file included from NWNXBase.cpp:22:
NWNXBase.h:92:97: error: too many decimal points in number
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray # in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:115: error: stray \302 in program
NWNXBase.h:115: error: stray \240 in program
NWNXBase.h:147:67: error: too many decimal points in number
In file included from NWNXBase.cpp:22:
NWNXBase.h:1: error: expected unqualified-id before < token
make: *** [NWNXBase.o] Error 1 |
According to the thread, I needed to add #include <stdlib.h> to nwnx2lib.cpp. That went a little more. I added <string.h> to NWNXBase.cpp, and it went even more.
Virusman stated:
So I then replaced that, which brought me to the error above. I went back and removed the suggested .h includes, but that errored out also. Looks like the fix wasn't actually a fix anymore. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 21:21 Post subject: |
|
|
Okay, and a little further.
In looking through the NWNXBase.h file I got from Virusman's link, it appears a lot of garbage got thrown in somewhere along the line. Line 109 is especially hosed up, as it starts a <table> but does not end. Most of the line appears to be commented out. After cleaning up much of the empty space, I was indeed left with line 109 throwing errors.
Code: | make
Makefile:21: target `db' given more than once in the same rule.
g++ -march=i386 -c -o nwnx2lib.o nwnx2lib.cpp
In file included from nwnx2lib.cpp:41:
NWNXBase.h:64: error: stray @ in program
In file included from nwnx2lib.cpp:41:
NWNXBase.h:86:97: error: too many decimal points in number
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray # in program
NWNXBase.h:109: error: stray \302 in program
NWNXBase.h:109: error: stray \240 in program
NWNXBase.h:141:67: error: too many decimal points in number
In file included from nwnx2lib.cpp:41:
NWNXBase.h:1: error: expected unqualified-id before < token
make: *** [nwnx2lib.o] Error 1
|
From the looks of Line 109, it appears that many of the pagebreaks were suddenly removed and left one long line, most of which was commented out completely. The line is severely hosed up. I even tried getting it a second time. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Tue Nov 17, 2009 22:33 Post subject: |
|
|
Which version are you trying to build? |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 22:45 Post subject: |
|
|
virusman wrote: | Which version are you trying to build? |
The latest one from sourceforge. linnwnx2-2.5.3-rc1.tar.gz
I tried rerunning the .h file after cleaning it up. I'm getting far less errors. However, 'make' now seems to spit out errors of lines having to do with ascii symbols that aren't ascii. Symbols such as open and closed parentheses, commas, periods, etc. all in the standard text.
Would it help to convert those to the HTML ascii codes as the coding inside appears to be HTML or XHTML.
Actually, it looks like something strange happened. When I downloaded the file, it seems to have included the HTML codes. WTF??? Even when I copied and pasted it from the file. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Tue Nov 17, 2009 23:20 Post subject: |
|
|
Okay, that is absolutely bizarre! Using Firefox, any time I copy and pasted or Save Link As... to get the file, it would spit out all of the HTML code mixed into the .h code. That's the strangest freaking thing.
I'd love to chalk that up to my 'operator error' board for which I have many marks, but I don't even get this one. Oh well, onward and forward...
Now it goes much further, and winds up with this:
Code: | make
Makefile:21: target `db' given more than once in the same rule.
g++ -mcpu=i386 -c -o nwnx2lib.o nwnx2lib.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
nwnx2lib.cpp: In function void Configure():
nwnx2lib.cpp:508: warning: deprecated conversion from string constant to char*
nwnx2lib.cpp:515: warning: deprecated conversion from string constant to char*
nwnx2lib.cpp: Assembler messages:
nwnx2lib.cpp:462: Warning: indirect jmp without `*'
nwnx2lib.cpp:496: Warning: indirect jmp without `*'
g++ -mcpu=i386 -c -o NWNXBase.o NWNXBase.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
g++ -mcpu=i386 -c -o gline.o gline.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
g++ -w -fPIC -shared -W -Wall -o nwnx2.so nwnx2lib.o NWNXBase.o gline.o -ldl -DHAVE_CONFIG_H
make -C db
make[1]: Entering directory `/home/<user>/nwnserver/nwnxtest/linnwnx2/db'
g++ -mcpu=i386 -I.. -c -o NWNXmysql.o NWNXmysql.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
NWNXmysql.cpp: In constructor CNWNXmysql::CNWNXmysql():
NWNXmysql.cpp:23: warning: deprecated conversion from string constant to char*
g++ -mcpu=i386 -I.. -c -o plugin-mysql.o plugin-mysql.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
g++ -mcpu=i386 -I.. -c -o data.o data.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
g++ -mcpu=i386 -I.. -c -o dbmysql.o dbmysql.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
dbmysql.cpp: In member function virtual bool DbMySql::SqlConn(ConnParam*):
dbmysql.cpp:52: warning: deprecated conversion from string constant to char*
dbmysql.cpp:60: warning: deprecated conversion from string constant to char*
dbmysql.cpp: In member function virtual unsigned int DbMySql::SqlExec(unsigned char*, char*, unsigned int):
dbmysql.cpp:101: warning: deprecated conversion from string constant to char*
dbmysql.cpp:110: warning: deprecated conversion from string constant to char*
dbmysql.cpp: In member function virtual unsigned int DbMySql::SqlFetch(char*, unsigned int):
dbmysql.cpp:207: warning: deprecated conversion from string constant to char*
dbmysql.cpp: In member function virtual void DbMySql::SqlExec(char*, unsigned int):
dbmysql.cpp:256: warning: deprecated conversion from string constant to char*
dbmysql.cpp:265: warning: deprecated conversion from string constant to char*
g++ -w -fPIC -shared -W -Wall -o nwnx_odbc.so NWNXmysql.o plugin-mysql.o data.o dbmysql.o -L/usr/lib/mysql -lmysqlclient -lz -DHAVE_CONFIG_H
make[1]: Leaving directory `/home/<user>/nwnserver/nwnxtest/linnwnx2/db'
make -C mnx
make[1]: Entering directory `/home/<user>/nwnserver/nwnxtest/linnwnx2/mnx'
g++ -mcpu=i386 -I.. -c -o NWNXmnx.o NWNXmnx.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
NWNXmnx.cpp: In constructor CNWNXmnx::CNWNXmnx():
NWNXmnx.cpp:27: warning: deprecated conversion from string constant to char*
NWNXmnx.cpp: In member function bool CNWNXmnx::ClientInit(const char*, const char*):
NWNXmnx.cpp:60: error: invalid conversion from const char* to char*
make[1]: *** [NWNXmnx.o] Error 1
make[1]: Leaving directory `/home/<user>/nwnserver/nwnxtest/linnwnx2/mnx'
make: *** [mnx] Error 2
|
This is with a clean dist. I even removed the old folder (saving the .h file), then untarred and started from scratch. Now it gets to this point and halts.
I'm only calling the 'db' plugin for the MySQL support, also. Is 'mnx' a plugin? Here's my command:
Code: |
./configure --prefix=/home/x12o/nwnserver --with-extraplugins="db"
|
Now that I think about it, I should probably go ahead and use all the plugins offered to try out. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
|
Back to top |
|
|
|