help compiling binary

Yose

Registered
I'm looking for some help in installing a program called opendchub (http://sourceforge.net/projects/opendchub/).

Someone handed me the binary of this file when it was v.0.7.3. saying that all they had to do was change some ?directories? and they were able to compile it.

Now, v.0.7.4. is available and i've been trying to ./configure and 'make' the file without anyluck and all.

Has anyone here tried this program or have any idea what the problem might be? Any help woul d be appreciated.
 
what errors you get? you may need to specify the target platform (HOST=Apple-Darwin-6.2 or so...) and do some extra stuff too...
 
I'm using MacOSX 10.2.3 and Kernel Version Darwin Kernel Version 6.3: Sat Dec 14 03:11:25 PST 2002; root:xnu/xnu-344.23.obj~4/RELEASE_PPC

This is the output for ./configure and make:

[CPE000393b8fca0-CM:~/applications/opendchub-0] yose% ./configure
creating cache ./config.cache
checking for a BSD compatible install... /sw/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether build environment is sane... yes
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking how to run the C preprocessor... gcc -E -traditional-cpp
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for malloc.h... no
checking for sys/time.h... yes
checking for unistd.h... yes
checking for sys/select.h... yes
checking for working const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for mode_t... yes
checking for pid_t... yes
checking for vprintf... yes
checking for gethostname... yes
checking for mkdir... yes
checking for select... yes
checking for socket... yes
checking for strstr... yes
checking for strtoll... yes
checking for strtoq... yes
checking for perl... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating src/Makefile
creating config.h

*** Type "gmake" to build opendchub ***
*** If "gmake" does not work, try "make" ***

[CPE000393b8fca0-CM:~/applications/opendchub-0] yose% make
make all-recursive
Making all in src
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -pipe -pipe -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE -g -O2 -c commands.c
commands.c: In function `quit_program':
commands.c:1624: incompatible type for argument 4 of `semctl'
make[2]: *** [commands.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2
[CPE000393b8fca0-CM:~/applications/opendchub-0] yose%
 
The code you're trying to compile might need minor changes to successfully port to Darwin. So if you want to make it work you will probably have to analyze why it doesn't compile

Open commands.c, navigate to line 1624 and check the call to semctl. Check argument 4 and find out which type it is. Obviously, this type does not match the one required by the semctl function of your system's C library. You can check in /usr/include/sys/sem.h what the difference is. Normally, the 4th argument of semctl must be a union semun. Probably it is sufficient to cast argument 4 to (union semun), but you should try to understand the relevant code and then decide which changes are necessary.
 
Back
Top