PDA

View Full Version : Can't compile ClanLib on OpenBSD



zmyrgel
03-04-2008, 07:21 PM
Hi,

I can't get the ClanLib to compile on OpenBSD-current or -4.2.

On both systems the configure script fails as it can't find the png although it's installed.

Any suggestions on how to get ClanLib to compile?

rombust
03-05-2008, 11:54 AM
Ensure that the PNG development package is installed, not just the libpng library.

If that does not work, have a look at: http://clanlib.org/docs/clanlib-0.9.0/overview/install-linux-gcc.html

This is how I install ClanLib 0.9 on linux.

zmyrgel
03-05-2008, 06:48 PM
Ok, posting more info.

configure goes through if I don't give any extra options for it besides the --prefix option but the compiling fails:


YS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DUSE_I386_ASSEMBLER=1 -DHAVE_FSTAB_H=1 -DHAVE_LIBZ=1 -DUSE_GETADDR=1 -I. -I. -g -O2 -I../../Sources -MT IOData/Generic/inputsource_file.lo -MD -MP -MF IOData/Generic/.deps/inputsource_file.Tpo -c IOData/Generic/inputsource_file.cpp -fPIC -DPIC -o IOData/Generic/.libs/inputsource_file.o
IOData/Generic/inputsource_file.cpp: In static member function `static
std::string CL_InputSource_File::translate_path(const std::string&)':
IOData/Generic/inputsource_file.cpp:74: error: `getcwd' undeclared (first use
this function)
IOData/Generic/inputsource_file.cpp:74: error: (Each undeclared identifier is
reported only once for each function it appears in.)
*** Error code 1

Stop in /home/zmyrgel/src/ClanLib-0.8.0/Sources/Core.
*** Error code 1

Stop in /home/zmyrgel/src/ClanLib-0.8.0/Sources (line 312 of Makefile).
*** Error code 1

Stop in /home/zmyrgel/src/ClanLib-0.8.0 (line 343 of Makefile).

As far as png goes, I've installed the png-1.2.18 and it installs following files:
bin/libpng-config
include/libpng/
include/libpng/png.h
include/libpng/pngconf.h
lib/libpng.a
lib/pkgconfig/
lib/pkgconfig/libpng.pc
@endfake
@man man/cat3/libpng.0
@man man/cat3/libpngpf.0
@man man/cat5/png.0
share/doc/png/
share/doc/png/libpng-${VERSION}.txt


I think the OpenBSD doesn't slice packages to separate dev-packages as Debian does.

And here's the gcc:
gcc version 3.3.5 (propolice)

I used following when it complains about the missing png:

./configure --enable-clanDisplay --enable-clanGL --enable-clanSDL --enable-clanSound --enable-clanNetwork --enable-clanGUI --enable-clanVorbis --enable-docs


The png and other external libs are all installed to /usr/local but I don't think that should affect the install process.

rombust
03-06-2008, 07:57 AM
It looks like IOData/Generic/inputsource_file.cpp is missing a "#include <unistd.h>"

I do not use OpenBSD or ClanLib 0.8. (i use Clanlib 0.9)

I am not sure why configure is rejecting png, it looks like "Setup/Tests/png.cpp" is failing. Try compiling that file manually, and see if it works.

(Also ensure that you are using the SVN of 0.8)