Problems building CVS in FreeBSD

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
Al Bilge
Star Pilot
Star Pilot
Posts: 6
Joined: Tue Jun 14, 2005 5:41 am

Problems building CVS in FreeBSD

Post by Al Bilge »

Hello,

I'm having problem configuring and build VegaStike CVS dated 14 of June 2005

I've just CVS'd vegastrike, data4.x, vssetup and music which is all I need I think and run configure with the following:

Code: Select all

--prefix=/home/agh/Games/VegaStrike --enable-release --enable-stencil-buffer --with-gl-libs=/usr/X11R6/lib --with-glu-libs=/usr/X11R6/lib --with-gl-inc=/usr/X11R6/include --with-glut-libs=/usr/X11R6/lib --with-glut-inc=/usr/X11R6/include --with-expat-libs=/usr/local/lib --with-expat-inc=/usr/local/include --with-png-libs=/usr/local/lib --with-png-inc=/usr/local/include/libpng --with-jpeg-libs=/usr/local/lib --with-jpeg-inc=/usr/local/include --with-vorbis-libs=/usr/local/lib --with-vorbis-inc=/usr/local/include --with-openal-inc=/usr/local/include/Al --with-openal-libs=/usr/local/lib --with-data-dir=/home/agh/Dev/Vegastrike/data.4x
I then run gmake which gets me here:

Code: Select all

gmake  all-recursive
gmake[1]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike'
Making all in src
gmake[2]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike/src'
Making all in cmd
gmake[3]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd'
Making all in ai
gmake[4]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/ai'
gmake[4]: Nothing to be done for `all'.
gmake[4]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/ai'
Making all in script
gmake[4]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/script'
Making all in c_alike
gmake[5]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/script/c_alike'
gmake[5]: Nothing to be done for `all'.
gmake[5]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/script/c_alike'
gmake[5]: Entering directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/script'
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..   -DHAVE_SDL=1 -DSDL_WINDOWING=1  -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/local/include -I/usr/local/include/libpng -I/usr/local/include -DJPEG_SUPPORT  -DUSE_STENCIL_BUFFER=1 -DDATA_DIR=\"/home/agh/Dev/Vegastrike/data.4x\"  -I/usr/local/include/python2.4 -DHAVE_PYTHON=1  -DUSE_BOOST_131=1 -I../../../src/boost129  -I../../../src   -pipe  -O2 -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2  -I/usr/local/include/SDL11 -I/usr/local/include -D_REENTRANT -pthread -pipe -MT pythonmission.o -MD -MP -MF ".deps/pythonmission.Tpo" -c -o pythonmission.o pythonmission.cpp; \
then mv -f ".deps/pythonmission.Tpo" ".deps/pythonmission.Po"; else rm -f ".deps/pythonmission.Tpo"; exit 1; fi
In file included from /usr/include/c++/3.4/ios:48,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iterator:71,
                 from /usr/local/include/boost/next_prior.hpp:15,
                 from /usr/local/include/boost/utility.hpp:16,
                 from /usr/local/include/boost/python/instance_holder.hpp:10,
                 from /usr/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /usr/local/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/local/include/boost/python/call.hpp:15,
                 from /usr/local/include/boost/python/object_core.hpp:12,
                 from /usr/local/include/boost/python/args.hpp:25,
                 from /usr/local/include/boost/python.hpp:11,
                 from ../../../src/python/init.h:10,
                 from pythonmission.cpp:7:
/usr/include/c++/3.4/bits/localefwd.h:58:34: macro "isspace" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/3.4/ios:48,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iterator:71,
                 from /usr/local/include/boost/next_prior.hpp:15,
                 from /usr/local/include/boost/utility.hpp:16,
                 from /usr/local/include/boost/python/instance_holder.hpp:10,

                 from /usr/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /usr/local/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/local/include/boost/python/call.hpp:15,
                 from /usr/local/include/boost/python/object_core.hpp:12,
                 from /usr/local/include/boost/python/args.hpp:25,
                 from /usr/local/include/boost/python.hpp:11,
                 from ../../../src/python/init.h:10,
                 from pythonmission.cpp:7:
/usr/include/c++/3.4/bits/localefwd.h:58: error: `std::isspace' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:58: error: template declaration of `bool std::isspace'
/usr/include/c++/3.4/bits/localefwd.h:70:34: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:70: error: `std::isupper' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:70: error: template declaration of `bool std::isupper'
/usr/include/c++/3.4/bits/localefwd.h:74:34: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:74: error: `std::islower' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:74: error: template declaration of `bool std::islower'
/usr/include/c++/3.4/bits/localefwd.h:78:34: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:78: error: `std::isalpha' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:78: error: template declaration of `bool std::isalpha'
/usr/include/c++/3.4/bits/localefwd.h:94:34: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:94: error: `std::isalnum' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:94: error: template declaration of `bool std::isalnum'
/usr/include/c++/3.4/bits/localefwd.h:102:34: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:102: error: `std::toupper' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:102: error: template declaration of `_CharT std::toupper'
/usr/include/c++/3.4/bits/localefwd.h:106:34: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/localefwd.h:106: error: `std::tolower' declared as an `inline' variable
/usr/include/c++/3.4/bits/localefwd.h:106: error: template declaration of `_CharT std::tolower'
In file included from /usr/include/c++/3.4/bits/basic_ios.h:44,
                 from /usr/include/c++/3.4/ios:51,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iterator:71,
                 from /usr/local/include/boost/next_prior.hpp:15,
                 from /usr/local/include/boost/utility.hpp:16,
                 from /usr/local/include/boost/python/instance_holder.hpp:10,
                 from /usr/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /usr/local/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/local/include/boost/python/call.hpp:15,
                 from /usr/local/include/boost/python/object_core.hpp:12,
                 from /usr/local/include/boost/python/args.hpp:25,
                 from /usr/local/include/boost/python.hpp:11,
                 from ../../../src/python/init.h:10,
                 from pythonmission.cpp:7:
/usr/include/c++/3.4/bits/locale_facets.h:226: error: `btowc' is not a type
In file included from /usr/include/c++/3.4/bits/basic_ios.h:44,
                 from /usr/include/c++/3.4/ios:51,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iterator:71,
                 from /usr/local/include/boost/next_prior.hpp:15,
                 from /usr/local/include/boost/utility.hpp:16,
                 from /usr/local/include/boost/python/instance_holder.hpp:10,
                 from /usr/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /usr/local/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/local/include/boost/python/call.hpp:15,
                 from /usr/local/include/boost/python/object_core.hpp:12,
                 from /usr/local/include/boost/python/args.hpp:25,
                 from /usr/local/include/boost/python.hpp:11,
                 from ../../../src/python/init.h:10,
                 from pythonmission.cpp:7:
/usr/include/c++/3.4/bits/locale_facets.h:241:53: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:241: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:254: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h:255: error: `btowc' is not a type
/usr/include/c++/3.4/bits/locale_facets.h:270:53: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:270: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:286: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h: In member function `_CharT std::__ctype_abstract_base<_CharT>::towupper(int (*)(_CharT)) const':
/usr/include/c++/3.4/bits/locale_facets.h:227: error: `__c' undeclared (first use this function)
/usr/include/c++/3.4/bits/locale_facets.h:227: error: (Each undeclared identifier is reported only once for each function it appears in.)
/usr/include/c++/3.4/bits/locale_facets.h: In member function `_CharT std::__ctype_abstract_base<_CharT>::towlower(int (*)(_CharT)) const':
/usr/include/c++/3.4/bits/locale_facets.h:256: error: `__c' undeclared (first use this function)
/usr/include/c++/3.4/bits/locale_facets.h: At global scope:
/usr/include/c++/3.4/bits/locale_facets.h:796: error: `btowc' is not a type
/usr/include/c++/3.4/bits/locale_facets.h:813:53: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:813: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:828: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h:829: error: `btowc' is not a type
/usr/include/c++/3.4/bits/locale_facets.h:846:53: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:846: error: expected `;' before "const"
/usr/include/c++/3.4/bits/locale_facets.h:865: error: expected `;' before "char_type"
/usr/include/c++/3.4/bits/locale_facets.h: In member function `char std::ctype<char>::towupper(int (*)(char)) const':
/usr/include/c++/3.4/bits/locale_facets.h:797: error: `__c' undeclared (first use this function)
/usr/include/c++/3.4/bits/locale_facets.h: In member function `char std::ctype<char>::towlower(int (*)(char)) const':
/usr/include/c++/3.4/bits/locale_facets.h:830: error: `__c' undeclared (first use this function)
/usr/include/c++/3.4/bits/locale_facets.h:4494:44: macro "isspace" passed 2 arguments, but takes just 1
In file included from /usr/include/c++/3.4/bits/basic_ios.h:44,
                 from /usr/include/c++/3.4/ios:51,
                 from /usr/include/c++/3.4/ostream:45,
                 from /usr/include/c++/3.4/iterator:71,
                 from /usr/local/include/boost/next_prior.hpp:15,
                 from /usr/local/include/boost/utility.hpp:16,
                 from /usr/local/include/boost/python/instance_holder.hpp:10,
                 from /usr/local/include/boost/python/object/pointer_holder.hpp:14,
                 from /usr/local/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/local/include/boost/python/call.hpp:15,
                 from /usr/local/include/boost/python/object_core.hpp:12,
                 from /usr/local/include/boost/python/args.hpp:25,
                 from /usr/local/include/boost/python.hpp:11,
                 from ../../../src/python/init.h:10,
                 from pythonmission.cpp:7:
/usr/include/c++/3.4/bits/locale_facets.h: At global scope:
/usr/include/c++/3.4/bits/locale_facets.h:4495: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4509:44: macro "isupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4510: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4513:56: macro "islower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4514: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4518:44: macro "isalpha" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4519: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4538:44: macro "isalnum" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4539: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4548:44: macro "toupper" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4549: error: invalid function declaration
/usr/include/c++/3.4/bits/locale_facets.h:4553:44: macro "tolower" passed 2 arguments, but takes just 1
/usr/include/c++/3.4/bits/locale_facets.h:4554: error: invalid function declaration
gmake[5]: *** [pythonmission.o] Error 1
gmake[5]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/script'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd/script'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike/src/cmd'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/agh/Dev/VegaStrike/vegastrike'
gmake: *** [all] Error 2
uname -a returns:
FreeBSD nova 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sat Jun 11 14:32:41 EST 2005 agh@nova:/usr/obj/usr/src/sys/NOVA i386

And a list of software required by VegaStrike:
GCC: gcc (GCC) 3.4.4 [FreeBSD] 20050518
X: xorg-6.8.2
Libpng: 1.2.8_2
Python: 2.4.1_1
Expat: 1.95.8_2
Libjpeg: 6b_3
OpenAL: 20050401

For some reason configure won't locate OpenAL and Vorbis even thou I can confirm they exsit in /usr/local/lib

[edit]
Can't seem to Konq or Firefox to add my config.log attachment :-(
So I've uploaded it here
[/edit]
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

That looks messy ;-) You'll have to sait for someone a bit more knowledgeable about c++ stuff I'm afraid (my only possible suggestion would be to compile with the --enable-boost-128 flag as well, if you've got time it won't hurt, but I'm not sure it would help) :-)

Dan.a
"Computers are useless. They can only give you answers."
-- Pablo Picasso
Al Bilge
Star Pilot
Star Pilot
Posts: 6
Joined: Tue Jun 14, 2005 5:41 am

Post by Al Bilge »

Well I thought I tried that, but anyways here is a bunch of different mess with "--enable-boost-128". Here's the log from that round.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

First, you need the devel version of OpenAL, not just OpenAL.

Anyway, any particular reason why you don't use the usual ways?

make clean
aclocal
autoconf
autoheader
automake -a --add-missing
./configure --enable-boost-128 --enable-release
make
make install

as per-wiki?

(Actually, I changed --enable-debug by --enable-release, you don't want --enable-debug)

PS: It does look like a configuration error, since I doubt the standard headers have errors
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Al Bilge
Star Pilot
Star Pilot
Posts: 6
Joined: Tue Jun 14, 2005 5:41 am

Post by Al Bilge »

klauss replyed:
First, you need the devel version of OpenAL, not just OpenAL.
Um what exactly is the devel version of OpenAL? I can't find FreeBSD packages with such a name.
I'm currently tyring to compile OpenAL-CVS but this is causing headaches.

Anyway, any particular reason why you don't use the usual ways?

make clean
aclocal
autoconf
autoheader
automake -a --add-missing
./configure --enable-boost-128 --enable-release
make
make install

as per-wiki?
I do use the usual ways. The only difference are the arguments passed to configure.

"./configure --enable-boost-128 --enable-release" dosen't work. I need to add a whole bunch of with-foo-lib options.
Al Bilge
Star Pilot
Star Pilot
Posts: 6
Joined: Tue Jun 14, 2005 5:41 am

Post by Al Bilge »

OK I found an openal-devel RPM on RPM Search. It's dated 2005-06-02 05:03:01 with a release of 0.4.20040726. I downloaded the source code and built and installed it to /usr/local. Still this doesn't solve the OpenAL configure problem I'm having.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

Perhaps you have an incompatible boost version. Boost versions are known for their incompatibility amongst them. If I'm not wrong (and I may be), the version being used by VS is 1.31
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Al Bilge
Star Pilot
Star Pilot
Posts: 6
Joined: Tue Jun 14, 2005 5:41 am

Post by Al Bilge »

OK tried version 1.31 of Boost and I still get the same thing.

Will try 1.30 next
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

First, you shouldn't need Boost installed because VS will use its version included. I would recommend using VS's version of boost (remove the /usr/local/include/boost directory temporarily so gcc won't see it).

Next, it seems that you have a strange ctype.h that uses macros for these functions.

If you want to try to fix the original error, I would suggest putting:

Code: Select all

#ifdef isspace
#undef isspace
#endif
#ifdef isupper
#undef isupper
#endif
#ifdef islower
#undef islower
#endif
#ifdef isalpha
#undef isalpha
#endif
#ifdef isalnum
#undef isalnum
#endif
#ifdef toupper
#undef toupper
#endif
#ifdef tolower
#undef tolower
#endif
Below any other "#include" declarations in /usr/include/c++/3.4/bits/localefwd.h
If the errors continue move the #undef declarations lower down until all the errors stop.

Although placing this at the top of /usr/include/c++/3.4/bits/localefwd.h might be the most compatible solution, but unfortunately this might break other programs. You should make a backup of this file and moving it back when done.
I recommend doing

Code: Select all

# mv localfwd.h localfwd.bak.h
# cp localfwd.bak.h localfwd.h
<edit localfwd.h>
<compile VS>
# mv localfwd.h localfwd.hack.h
# mv localfwd.bak.h localfwd.h
This will keep the timestamp and the contents the same as it used to be after the process is done so that other programs will not need to be recompiled.

You could also paste the "#undef" declarations like crazy at the top of various boost headers that are listed in the compile log.

Hopefully this will solve these errors. Please reply either way. :-)
Al Bilge
Star Pilot
Star Pilot
Posts: 6
Joined: Tue Jun 14, 2005 5:41 am

Post by Al Bilge »

Hey ace123,

Removing Boost and #undef-ing localefwd.h solved the problem. However the build process failed in src/networking/inet_file.cpp with the following:

Code: Select all

#if !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(BSD)
#include <error.h>
#endif
I removed that #ifdef and I can now play Privateer natively on my system.

Thanks for the help :-)
energyman76b
ISO Party Member
ISO Party Member
Posts: 445
Joined: Tue Feb 11, 2003 8:04 am

Post by energyman76b »

Al Bilge:

oepnal-dev (as all -dev packets) is a rpm-based distro problem.

Since FreeBSD does not use rpms, everything needed should be installed (I never understand, why headers are put into seperate packages... but its redhats/suses/blablablas choice to irritate users this way).
Post Reply