Page 1 of 1

Need help compiling on ubuntu

Posted: Thu Jan 03, 2008 3:11 am
by fury

Code: Select all

std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&, int&) const':
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:414: undefined reference to `openWavFile(char const*, short*, long*, int*, short*, short*)'
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:418: undefined reference to `readWavData(_IO_FILE*, char*, int, int)'
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:424: undefined reference to `closeWavFile(_IO_FILE*)'
/home/christina/Desktop/bzflag-2.0.10/src/platform/BzfMedia.cxx:421: undefined reference to `closeWavFile(_IO_FILE*)'
collect2: ld returned 1 exit status
make[2]: *** [bzflag] Erro[/quote]r 1
make[2]: Leaving directory `/home/christina/Desktop/bzflag-2.0.10/src/bzflag'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/christina/Desktop/bzflag-2.0.10/src'
make: *** [all-recursive] Error 1
I did "make", and that's what I got. I dunno what to do about it. Help? :?

Posted: Thu Jan 03, 2008 6:12 am
by macsforme
It would help if you could post the entire output (in an attachment, please) so we can see it in full detail. From the looks of things, I'm guessing there's one or more development libraries (headers) missing.

Posted: Thu Jan 03, 2008 9:34 pm
by fury
Okay. Here's my compiling thing.

Posted: Fri Jan 04, 2008 2:05 am
by Macrosoft
try installing the libsdl1.2-dev package. you can get it through a terminal window by running "sudo apt-get install libsdl1.2-dev" without the quotes.
it will tell you if you already have it installed.

Posted: Fri Jan 04, 2008 2:09 am
by fury
Already have it.

Posted: Fri Jan 04, 2008 2:37 am
by F687/s
> try installing the libsdl1.2-dev package.

As far as I know, libsdl1.2-dev only includes the bare-bones SDL dev files. You may need to install the other SDL dev packages (libsdl-sound1.2-dev, libsdl-mixer1.2-dev ?) in order for it to work.

Also, the bzflag source (wave.cxx) defines an openWavFile, so maybe your libs aren't working correctly.

Posted: Fri Jan 04, 2008 3:08 am
by fury

Code: Select all

 file = openWavFile(filename.c_str(), &format, &speed, &numFrames, &channels, &width);
  if (!file) return 0;
  rate=speed;
  rawdata=new char[numFrames*width*channels];
  if (readWavData(file, rawdata, numFrames*channels, width)) {
    fprintf(stderr, "Failed to read the wav data\n");
    delete [] rawdata;
    closeWavFile(file);
    return 0;
  }
  closeWavFile(file);
I removed that from BzfMedia.cxx and it compiled all the way through, but now it's not making any runnable files. >_>

Posted: Fri Jan 04, 2008 3:47 am
by DTRemenak
It shouldn't be building that at all, it's only supposed to be compiled without HAVE_SDL defined. When we have SDL, we use SDL to load wave files without using our own code. Try running configure again.

Posted: Fri Jan 04, 2008 5:31 pm
by anomaly
If running configure again does not work...

Some distros have separate SDL libs and headers for sound, image, etc. The configure.ac file does not include a check for SDL sound specifically. Check to make sure you have SDL sound libs and devel packages. Or try using your package manager to install them. You don't have SDL_image either. You should get that too. You obviously have SDL because sdl-config worked. But it does not appear that you have the SDL devel packages (header files).

Also you shouldn't need to be root to build bzflag. Just to install. Unless you're installing in your home directory.

Posted: Sat Jan 05, 2008 12:14 am
by F687/s
> I removed that from BzfMedia.cxx and it compiled all the way through, but now it's not making any runnable files. >_>

By removing that (which I hope you just commented it out), it should still be able to compile and run, just not play .wav files. What error do you get if you try to run it?

Posted: Sat Jan 05, 2008 4:02 am
by fury
Nothing, there is actually no file to run.

Posted: Sat Jan 05, 2008 6:45 am
by macsforme
Fury wrote:Nothing, there is actually no file to run.
The actual compiled binaries are installed by the "make install" command. If your build process completed successfully, there should be a binary at <source>/src/bzflag/bzflag. If it did not complete successfully, it should've given some sort of error.

Posted: Sat Jan 05, 2008 7:09 am
by blast
Before a 'make install', the binary files will be in the following locations:
./src/bzfs/bzfs
./src/bzflag/bzflag
./src/bzadmin/bzadmin
(assuming they're all set to build)

Posted: Sat Jan 05, 2008 10:30 pm
by fury
Okay, I got a working program, but it can't connect to any servers. I can see the server list, though.

Posted: Sun Jan 06, 2008 3:14 am
by blast
What error do you get?

Posted: Sun Jan 06, 2008 3:22 am
by fury
"Server not found"

Posted: Mon Jan 07, 2008 6:36 am
by fury
I did it in debug mode, and it said..

bzflag: /usr/local/lib/libcurl.so.4: no version information available (required by bzflag)
BZFlag version: 2.0.10.20080106-MAINT-linux-gnu-SDL
BZFlag protocol: 0026
OpenGL vendor: NVIDIA Corporation
OpenGL version: 2.1.0 NVIDIA 96.39
OpenGL renderer: GeForce FX 5200/AGP/SSE/3DNOW!
Depth Buffer: 24 bitplanes
LIBCURL version: libcurl/7.17.1 zlib/1.2.3.3
Player [0] failed to resolve: error 11
Player [0] failed to resolve: error 11