Server Help

ASSS Questions - Error compiling on Darwin/Mac OS X

Lynx - Mon Jan 26, 2009 9:21 am
Post subject: Error compiling on Darwin/Mac OS X
I've been attempting to get asss compiling on OS X (with help from Goldeye), however I'm stuck on this issue.

Make Deps:
Code: Show/Hide

christopher-burkes-macbook-pro:src turkst3r$ make deps
python /asss-1.4.4/scripts/makedeps.py -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -I/usr/include/BerkeleyDB.4.5/include -I/usr/include/mysql/include -I/usr//include/python2.3 \
      */*.c -P '$(BUILDDIR)/' -o /asss-1.4.4/build/deps.mk
makedeps: ignoring option: -I/asss-1.4.4/build
makedeps: ignoring option: -D_REENTRANT
makedeps: ignoring option: -D_GNU_SOURCE
makedeps: ignoring option: -fPIC
makedeps: ignoring option: -I/usr/include/BerkeleyDB.4.5/include
makedeps: ignoring option: -I/usr/include/mysql/include
makedeps: ignoring option: -I/usr//include/python2.3
makedeps: warning: "pthread.h" not found
makedeps: warning: "zlib.h" not found
makedeps: warning: "mysql.h" not found
makedeps: warning: "db.h" not found
makedeps: warning: "errno.h" not found
makedeps: warning: "Python.h" not found
makedeps: warning: "structmember.h" not found


Make
Code: Show/Hide

christopher-burkes-macbook-pro:src turkst3r$ make
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/admincmd.o core/admincmd.c
core/admincmd.c: In function ?Cdelfile?:
core/admincmd.c:63: error: ?PATH_MAX? undeclared (first use in this function)
core/admincmd.c:63: error: (Each undeclared identifier is reported only once
core/admincmd.c:63: error: for each function it appears in.)
core/admincmd.c:63: warning: unused variable ?path?
core/admincmd.c:63: warning: unused variable ?wd?
core/admincmd.c: In function ?Crenfile?:
core/admincmd.c:85: error: ?PATH_MAX? undeclared (first use in this function)
core/admincmd.c:85: warning: unused variable ?newpath?
core/admincmd.c:85: warning: unused variable ?oldpath?
core/admincmd.c:85: warning: unused variable ?wd?
core/admincmd.c: In function ?Cgetfile?:
core/admincmd.c:124: error: ?PATH_MAX? undeclared (first use in this function)
core/admincmd.c:124: warning: unused variable ?path?
core/admincmd.c:124: warning: unused variable ?wd?
core/admincmd.c: In function ?Cputfile?:
core/admincmd.c:241: error: ?PATH_MAX? undeclared (first use in this function)
core/admincmd.c:241: warning: unused variable ?serverpath?
core/admincmd.c:241: warning: unused variable ?wd?
core/admincmd.c: In function ?Cputzip?:
core/admincmd.c:288: error: ?PATH_MAX? undeclared (first use in this function)
core/admincmd.c:288: warning: unused variable ?serverpath?
core/admincmd.c:288: warning: unused variable ?wd?
core/admincmd.c: In function ?Cpwd?:
core/admincmd.c:379: error: ?PATH_MAX? undeclared (first use in this function)
core/admincmd.c:379: warning: unused variable ?wd?
{standard input}:84:non-relocatable subtraction expression, "_logfile" minus "L00000000001$pb"
{standard input}:84:symbol: "_logfile" can't be undefined in a subtraction expression
{standard input}:69:non-relocatable subtraction expression, "_logfile" minus "L00000000001$pb"
{standard input}:69:symbol: "_logfile" can't be undefined in a subtraction expression
make: *** [/asss-1.4.4/build/admincmd.o] Error 1


When I locate limits.h it returns (amongst others):
Code: Show/Hide

/usr/include/i386/limits.h
/usr/include/limits.h


As I understand it, PATH_MAX errors are usually due to different different distros, which could well be the reason in my case. Goldeye suggested to use #include <sys/limits.h> in the indef WIN32 section, however still no avail.

Code: Show/Hide

Licience stuff was here, not important. This is the limits.h file (/usr/include/limits.h)
*   @(#)limits.h   8.2 (Berkeley) 1/4/94
*/

#ifndef _LIMITS_H_
#define   _LIMITS_H_

#include <sys/cdefs.h>
#include <machine/limits.h>
#include <sys/syslimits.h>

#if !defined(_ANSI_SOURCE)
#define _POSIX_AIO_LISTIO_MAX   2
#define _POSIX_AIO_MAX          1
#define _POSIX_DELAYTIMER_MAX   32
#define _POSIX_HOST_NAME_MAX    255
#define _POSIX_LOGIN_NAME_MAX   9
#define _POSIX_MQ_OPEN_MAX      8
#define _POSIX_MQ_PRIO_MAX   32

#define   _POSIX_ARG_MAX      4096
#define   _POSIX_CHILD_MAX   25
#define   _POSIX_LINK_MAX      8
#define   _POSIX_MAX_CANON   255
#define   _POSIX_MAX_INPUT   255
#define   _POSIX_NAME_MAX      14
#define   _POSIX_NGROUPS_MAX   8
#define   _POSIX_OPEN_MAX      20
#define   _POSIX_PATH_MAX      256
#define PATH_MAX   256
#define   _POSIX_PIPE_BUF      512
#define   _POSIX_SSIZE_MAX   32767
#define   _POSIX_STREAM_MAX   8
#define   _POSIX_TZNAME_MAX   6

#define _POSIX_RE_DUP_MAX          255
#define _POSIX_RTSIG_MAX          8
#define _POSIX_SEM_NSEMS_MAX          256
#define _POSIX_SEM_VALUE_MAX          32767
#define _POSIX_SIGQUEUE_MAX          32
#define _POSIX_SS_REPL_MAX          4
#define _POSIX_SYMLINK_MAX          255
#define _POSIX_SYMLOOP_MAX          8
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS    4
#define _POSIX_THREAD_KEYS_MAX          128
#define _POSIX_THREAD_THREADS_MAX       64
#define _POSIX_TIMER_MAX          32
#define _POSIX_TRACE_EVENT_NAME_MAX       30
#define _POSIX_TRACE_NAME_MAX          8
#define _POSIX_TRACE_SYS_MAX          8
#define _POSIX_TRACE_USER_EVENT_MAX       32
#define _POSIX_TTY_NAME_MAX          9

#define   _POSIX2_BC_BASE_MAX      99
#define   _POSIX2_BC_DIM_MAX      2048
#define   _POSIX2_BC_SCALE_MAX      99
#define   _POSIX2_BC_STRING_MAX      1000
#define _POSIX2_CHARCLASS_NAME_MAX   14
#define   _POSIX2_COLL_WEIGHTS_MAX   2
#define   _POSIX2_EQUIV_CLASS_MAX      2
#define   _POSIX2_EXPR_NEST_MAX      32
#define   _POSIX2_LINE_MAX      2048
#define   _POSIX2_RE_DUP_MAX      255

#define PTHREAD_STACK_MIN       8192
#define PTHREAD_DESTRUCTOR_ITERATIONS    4
#define PTHREAD_KEYS_MAX       512

#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#define PASS_MAX   128
#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */

#define NL_ARGMAX   9
#define NL_LANGMAX   14
#define NL_MSGMAX   32767
#define NL_NMAX      1
#define NL_SETMAX   255
#define NL_TEXTMAX   2048

#define _XOPEN_IOV_MAX   16
#define IOV_MAX      1024
#define _XOPEN_NAME_MAX 255
#define _XOPEN_PATH_MAX 1024

#endif /* _ANSI_SOURCE */

/* NZERO to be defined here. TBD. See also sys/param.h  */

#endif /* !_LIMITS_H_ */


Many thanks in advance,

Lynx
Dr Brain - Mon Jan 26, 2009 5:00 pm
Post subject:
The make deps warnings can be ignored.

Tried changing the #include to just <limits.h>? Also, which file were you changing? You didn't specify in your post. I assume admincmd.c.
Lynx - Mon Jan 26, 2009 6:11 pm
Post subject:
Ah no, I added it to main.c as that's where the error initially came from, so it did make a difference. I never noticed the difference between main.c and admincmd.c - many thanks on that one.

I'm now getting an output of:

Code: Show/Hide

christopher-burkes-macbook-pro:src turkst3r$ make
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/admincmd.o core/admincmd.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/watchdamage.o core/watchdamage.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/buy.o core/buy.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/help.o core/help.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/notify.o core/notify.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/directory.o core/directory.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/billing.o core/billing.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/billing_ssc.o core/billing_ssc.c
core/billing_ssc.c: In function ?authenticate?:
core/billing_ssc.c:193: warning: pointer targets in passing argument 1 of ?astrncpy? differ in signedness
core/billing_ssc.c:194: warning: pointer targets in passing argument 1 of ?astrncpy? differ in signedness
core/billing_ssc.c: In function ?onchatmsg?:
core/billing_ssc.c:357: warning: pointer targets in passing argument 1 of ?delimcpy? differ in signedness
core/billing_ssc.c:359: warning: pointer targets in passing argument 1 of ?strcpy? differ in signedness
core/billing_ssc.c:360: warning: pointer targets in passing argument 1 of ?astrncpy? differ in signedness
core/billing_ssc.c:362: warning: pointer targets in passing argument 1 of ?strchr? differ in signedness
core/billing_ssc.c:384: warning: pointer targets in passing argument 1 of ?snprintf? differ in signedness
core/billing_ssc.c:386: warning: pointer targets in passing argument 1 of ?strchr? differ in signedness
core/billing_ssc.c: In function ?rewrite_chat_command?:
core/billing_ssc.c:422: warning: pointer targets in initialization differ in signedness
core/billing_ssc.c:425: warning: pointer targets in passing argument 1 of ?strcpy? differ in signedness
core/billing_ssc.c: In function ?Cdefault?:
core/billing_ssc.c:481: warning: pointer targets in passing argument 1 of ?astrncpy? differ in signedness
core/billing_ssc.c:485: warning: pointer targets in passing argument 1 of ?strchr? differ in signedness
core/billing_ssc.c: In function ?process_user_login?:
core/billing_ssc.c:646: warning: pointer targets in passing argument 2 of ?astrncpy? differ in signedness
core/billing_ssc.c:647: warning: pointer targets in passing argument 2 of ?astrncpy? differ in signedness
core/billing_ssc.c:648: warning: pointer targets in passing argument 2 of ?astrncpy? differ in signedness
core/billing_ssc.c: In function ?process_rmt?:
core/billing_ssc.c:702: warning: pointer targets in passing argument 2 of ?delimcpy? differ in signedness
core/billing_ssc.c: In function ?process_cmdchat?:
core/billing_ssc.c:854: warning: pointer targets in passing argument 1 of ?strchr? differ in signedness
core/billing_ssc.c:855: warning: pointer targets in passing argument 1 of ?strncmp? differ in signedness
core/billing_ssc.c:857: warning: pointer targets in passing argument 1 of ?strncmp? differ in signedness
core/billing_ssc.c: In function ?process_packet?:
core/billing_ssc.c:973: warning: pointer targets in passing argument 1 of ?process_user_login? differ in signedness
core/billing_ssc.c:976: warning: pointer targets in passing argument 1 of ?process_rmt? differ in signedness
core/billing_ssc.c:979: warning: pointer targets in passing argument 1 of ?process_kickout? differ in signedness
core/billing_ssc.c:982: warning: pointer targets in passing argument 1 of ?process_cmdchat? differ in signedness
core/billing_ssc.c:985: warning: pointer targets in passing argument 1 of ?process_chanchat? differ in signedness
core/billing_ssc.c:988: warning: pointer targets in passing argument 1 of ?process_scorereset? differ in signedness
core/billing_ssc.c:991: warning: pointer targets in passing argument 1 of ?process_userpkt? differ in signedness
core/billing_ssc.c:994: warning: pointer targets in passing argument 1 of ?process_identity? differ in signedness
core/billing_ssc.c:997: warning: pointer targets in passing argument 1 of ?process_mchanchat? differ in signedness
core/billing_ssc.c: In function ?got_connection?:
core/billing_ssc.c:1028: warning: pointer targets in passing argument 1 of ?astrncpy? differ in signedness
core/billing_ssc.c:1033: warning: pointer targets in passing argument 1 of ?astrncpy? differ in signedness
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/pwcache.o core/pwcache.c
core/pwcache.c: In function ?hash_password?:
core/pwcache.c:31: warning: pointer targets in passing argument 2 of ?MD5Update? differ in signedness
python /asss-1.4.4/scripts/extract-cfg-docs.py -c /asss-1.4.4/build/cfghelp.inc */*.c */*.py core/clientset.def
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/cfghelp.o core/cfghelp.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/filetrans.o core/filetrans.c
core/filetrans.c: In function ?get_data?:
core/filetrans.c:180: warning: pointer targets in passing argument 1 of ?strncpy? differ in signedness
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/quickfix.o core/quickfix.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/freqowners.o core/freqowners.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/arenaperm.o core/arenaperm.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/auth_prefix.o core/auth_prefix.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/fake.o core/fake.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/chatnet.o core/chatnet.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/ap_multipub.o core/ap_multipub.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/sendfile.o core/sendfile.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/auth_ban.o core/auth_ban.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/auth_file.o core/auth_file.c
core/auth_file.c: In function ?hash_password?:
core/auth_file.c:70: warning: pointer targets in passing argument 2 of ?MD5Update? differ in signedness
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/obscene.o core/obscene.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/deadlock.o core/deadlock.c
gcc -std=gnu99 -pipe -I. -Iinclude -I/asss-1.4.4/build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o /asss-1.4.4/build/unixsignal.o core/unixsignal.c
core/unixsignal.c: In function ?handle_sigsegv?:
core/unixsignal.c:90: warning: implicit declaration of function ?fcloseall?
gcc -std=gnu99 -pipe  -fPIC  -dynamic -o /asss-1.4.4/build/asss /asss-1.4.4/build/main.o /asss-1.4.4/build/module.o /asss-1.4.4/build/cmod.o /asss-1.4.4/build/util.o /asss-1.4.4/build/pathutil.o /asss-1.4.4/build/protutil.o /asss-1.4.4/build/rwlock.o /asss-1.4.4/build/app.o /asss-1.4.4/build/md5.o /asss-1.4.4/build/config.o /asss-1.4.4/build/prng.o /asss-1.4.4/build/player.o /asss-1.4.4/build/core.o /asss-1.4.4/build/logman.o /asss-1.4.4/build/idle.o /asss-1.4.4/build/mainloop.o /asss-1.4.4/build/net.o /asss-1.4.4/build/enc_null.o /asss-1.4.4/build/enc_vie.o /asss-1.4.4/build/arenaman.o /asss-1.4.4/build/mapdata.o /asss-1.4.4/build/mapnewsdl.o /asss-1.4.4/build/clientset.o /asss-1.4.4/build/capman.o /asss-1.4.4/build/lagdata.o /asss-1.4.4/build/lagaction.o /asss-1.4.4/build/bw_default.o /asss-1.4.4/build/bw_nolimit.o /asss-1.4.4/build/log_file.o /asss-1.4.4/build/log_console.o /asss-1.4.4/build/log_sysop.o /asss-1.4.4/build/log_staff.o /asss-1.4.4/build/game.o /asss-1.4.4/build/game_timer.o /asss-1.4.4/build/chat.o /asss-1.4.4/build/flagcore.o /asss-1.4.4/build/balls.o /asss-1.4.4/build/fm_normal.o /asss-1.4.4/build/banners.o /asss-1.4.4/build/bricks.o /asss-1.4.4/build/objects.o /asss-1.4.4/build/messages.o /asss-1.4.4/build/koth.o /asss-1.4.4/build/fm_lockspec.o /asss-1.4.4/build/cmdman.o /asss-1.4.4/build/playercmd.o /asss-1.4.4/build/admincmd.o /asss-1.4.4/build/watchdamage.o /asss-1.4.4/build/buy.o /asss-1.4.4/build/help.o /asss-1.4.4/build/notify.o /asss-1.4.4/build/directory.o /asss-1.4.4/build/billing.o /asss-1.4.4/build/billing_ssc.o /asss-1.4.4/build/pwcache.o /asss-1.4.4/build/cfghelp.o /asss-1.4.4/build/filetrans.o /asss-1.4.4/build/quickfix.o /asss-1.4.4/build/freqowners.o /asss-1.4.4/build/arenaperm.o /asss-1.4.4/build/auth_prefix.o /asss-1.4.4/build/fake.o /asss-1.4.4/build/chatnet.o /asss-1.4.4/build/ap_multipub.o /asss-1.4.4/build/sendfile.o /asss-1.4.4/build/auth_ban.o /asss-1.4.4/build/auth_file.o /asss-1.4.4/build/obscene.o /asss-1.4.4/build/deadlock.o /asss-1.4.4/build/unixsignal.o  -lpthread -lz -lm
Undefined symbols:
  "_pthread_cond_mainwait", referenced from:
      _main in main.o
  "_fcloseall", referenced from:
      _handle_sigsegv in unixsignal.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [/asss-1.4.4/build/asss] Error 1


Thanks in advance,

Lynx
Anonymous - Sat Jan 31, 2009 8:50 pm
Post subject:
bump?
Anonymous - Thu Feb 05, 2009 2:17 am
Post subject:
IIRC fcloseall is linux only. You gotta work around it in code. As for the pthread call I'm not sure offhand. Maybe make sure it's an up to date/ gnu version?
Anonymous - Sat Apr 25, 2009 8:20 pm
Post subject:
Worked around fcloseall in code, however now I'm getting

Code: Show/Hide

Undefined symbols:
  "_pthread_cond_mainwait", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [../build/asss] Error 1
christopher-burkes-macbook-pro:src cpburke$

which I got before. Going to try working around this again later.

-L
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group