Server Help

ASSS Questions - Path_max

Icebird - Wed Oct 08, 2008 12:31 pm
Post subject: Path_max
I am trying to compile AS3 on linux. when i run the makefile it compiles many files but then stops at admincmd.c:

Code: Show/Hide

gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/admincmd.o core/admincmd.c
core/admincmd.c: In Funktion ?Cdelfile?:
core/admincmd.c:63: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)


in english: Error: ?PATH_MAX? not declared (First use in this function)

which file does normally contain PATH_MAX?
Dr Brain - Wed Oct 08, 2008 1:42 pm
Post subject:
That's not an asss issue, really, it's just your build environment doesn't contain the define. limits.h contains it on most machines. Make sure yours has it.

The command
Code: Show/Hide
man limits.h

might be helpful.
Icebird - Wed Oct 08, 2008 2:22 pm
Post subject:
Searching for limits.h shows 10 results. The one in /usr/include/linux defines it. How do I tell gcc to use that one?
Dr Brain - Wed Oct 08, 2008 4:28 pm
Post subject:
I've never seen a setup like that, where it's in linux/. I guess add an -I/usr/include/linux to the STD_CFLAGS in Makefile.
Icebird - Wed Oct 08, 2008 5:21 pm
Post subject:
The strange thing is, most other files compile. Here is the console output:

Code: Show/Hide

make
Makefile:110: ../build/deps.mk: Datei oder Verzeichnis nicht gefunden
python ../scripts/makedeps.py -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -I/opt/db-4.0.14/include -I/opt/mysql/include -I/usr/include/python2.5 \
      */*.c -P '$(BUILDDIR)/' -o ../build/deps.mk
makedeps: ignoring option: -D_REENTRANT
makedeps: ignoring option: -D_GNU_SOURCE
makedeps: ignoring option: -fPIC
makedeps: ignoring option: -I/opt/db-4.0.14/include
makedeps: ignoring option: -I/opt/mysql/include
makedeps: ignoring option: -I/usr/include/python2.5
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
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/main.o main/main.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/module.o main/module.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/cmod.o main/cmod.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/util.o main/util.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/pathutil.o main/pathutil.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/protutil.o main/protutil.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/rwlock.o main/rwlock.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/app.o main/app.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/md5.o main/md5.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/config.o core/config.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/prng.o core/prng.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/player.o core/player.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/core.o core/core.c
core/core.c: In Funktion ?get_checksum?:
core/core.c:104: Warnung: Zeigerziele bei ?bergabe des Arguments 2 von ?crc32? unterscheiden sich im Vorzeichenbesitz
core/core.c: In Funktion ?PLogin?:
core/core.c:527: Warnung: Zeigerziele in Initialisierung unterscheiden sich im Vorzeichenbesitz
core/core.c:527: Warnung: Zeigerziele in Initialisierung unterscheiden sich im Vorzeichenbesitz
core/core.c: In Funktion ?SendLoginResponse?:
core/core.c:810: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?astrncpy? unterscheiden sich im Vorzeichenbesitz
core/core.c:811: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strlen? unterscheiden sich im Vorzeichenbesitz
core/core.c:817: Warnung: Zeigerziele bei ?bergabe des Arguments 2 von ?net->SendToOne? unterscheiden sich im Vorzeichenbesitz
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/logman.o core/logman.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/idle.o core/idle.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/mainloop.o core/mainloop.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/net.o core/net.c
core/net.c: In Funktion ?handle_game_packet?:
core/net.c:916: Warnung: Zeigerziele bei ?bergabe des Arguments 6 von ?recvfrom? unterscheiden sich im Vorzeichenbesitz
core/net.c: In Funktion ?handle_ping_packet?:
core/net.c:1046: Warnung: Zeigerziele bei ?bergabe des Arguments 6 von ?recvfrom? unterscheiden sich im Vorzeichenbesitz
core/net.c:1079: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strncpy? unterscheiden sich im Vorzeichenbesitz
core/net.c: In Funktion ?handle_client_packet?:
core/net.c:1170: Warnung: Zeigerziele bei ?bergabe des Arguments 6 von ?recvfrom? unterscheiden sich im Vorzeichenbesitz
core/net.c: In Funktion ?process_lagouts?:
core/net.c:1588: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strcat? unterscheiden sich im Vorzeichenbesitz
core/net.c:1589: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strcat? unterscheiden sich im Vorzeichenbesitz
core/net.c:1591: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strlen? unterscheiden sich im Vorzeichenbesitz
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/enc_null.o core/enc_null.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/enc_vie.o core/enc_vie.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/arenaman.o core/arenaman.c
python ../scripts/gensparse.py ../build/sparse.inc ../scripts/sparse_params.py
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/mapdata.o core/mapdata.c
core/mapdata.c: In Funktion ?process_map_chunk?:
core/mapdata.c:317: Warnung: Zeigerziele bei ?bergabe des Arguments 2 von ?delimcpy? unterscheiden sich im Vorzeichenbesitz
core/mapdata.c:317: Warnung: Zeigerziele in Zuweisung unterscheiden sich im Vorzeichenbesitz
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/mapnewsdl.o core/mapnewsdl.c
core/mapnewsdl.c: In Funktion ?compress_map?:
core/mapnewsdl.c:210: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strncpy? unterscheiden sich im Vorzeichenbesitz
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/clientset.o core/clientset.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/capman.o core/capman.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/lagdata.o core/lagdata.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/lagaction.o core/lagaction.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/bw_default.o core/bw_default.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/bw_nolimit.o core/bw_nolimit.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/log_file.o core/log_file.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/log_console.o core/log_console.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/log_sysop.o core/log_sysop.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/log_staff.o core/log_staff.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/game.o core/game.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/game_timer.o core/game_timer.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/chat.o core/chat.c
core/chat.c: In Funktion ?PChat?:
core/chat.c:632: Warnung: Zeigerziele in Zuweisung unterscheiden sich im Vorzeichenbesitz
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/flagcore.o core/flagcore.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/balls.o core/balls.c

gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/fm_normal.o core/fm_normal.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/banners.o core/banners.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/bricks.o core/bricks.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/objects.o core/objects.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/messages.o core/messages.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/koth.o core/koth.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/fm_lockspec.o core/fm_lockspec.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/cmdman.o core/cmdman.c
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/playercmd.o core/playercmd.c
core/playercmd.c: In Funktion ?Carena?:
core/playercmd.c:148: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?check_arena? unterscheiden sich im Vorzeichenbesitz
core/playercmd.c:152: Warnung: Zeigerziele bei ?bergabe des Arguments 1 von ?strncpy? unterscheiden sich im Vorzeichenbesitz
core/playercmd.c:165: Warnung: Zeigerziele bei ?bergabe des Arguments 2 von ?translate_arena_packet? unterscheiden sich im Vorzeichenbesitz
gcc -std=gnu99 -pipe -I. -Iinclude -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/admincmd.o core/admincmd.c
core/admincmd.c: In Funktion ?Cdelfile?:
core/admincmd.c:63: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)
core/admincmd.c:63: Fehler: (Jeder nicht deklarierte Bezeichner wird nur einmal aufgef?hrt
core/admincmd.c:63: Fehler: f?r jede Funktion in der er auftritt.)
core/admincmd.c:63: Warnung: Variable ?path? wird nicht verwendet
core/admincmd.c:63: Warnung: Variable ?wd? wird nicht verwendet
core/admincmd.c: In Funktion ?Crenfile?:
core/admincmd.c:85: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)
core/admincmd.c:85: Warnung: Variable ?newpath? wird nicht verwendet
core/admincmd.c:85: Warnung: Variable ?oldpath? wird nicht verwendet
core/admincmd.c:85: Warnung: Variable ?wd? wird nicht verwendet
core/admincmd.c: In Funktion ?Cgetfile?:
core/admincmd.c:124: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)
core/admincmd.c:124: Warnung: Variable ?path? wird nicht verwendet
core/admincmd.c:124: Warnung: Variable ?wd? wird nicht verwendet
core/admincmd.c: In Funktion ?Cputfile?:
core/admincmd.c:241: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)
core/admincmd.c:241: Warnung: Variable ?serverpath? wird nicht verwendet
core/admincmd.c:241: Warnung: Variable ?wd? wird nicht verwendet
core/admincmd.c: In Funktion ?Cputzip?:
core/admincmd.c:288: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)
core/admincmd.c:288: Warnung: Variable ?serverpath? wird nicht verwendet
core/admincmd.c:288: Warnung: Variable ?wd? wird nicht verwendet
core/admincmd.c: In Funktion ?Cpwd?:
core/admincmd.c:379: Fehler: ?PATH_MAX? nicht deklariert (erste Benutzung in dieser Funktion)
core/admincmd.c:379: Warnung: Variable ?wd? wird nicht verwendet
make: *** [../build/admincmd.o] Fehler 1

Dr Brain - Wed Oct 08, 2008 6:47 pm
Post subject:
I'd suggest altering the Makefile as outlined in my last post. Add a -I/usr/include/linux somewhere in the STD_CFLAGS option.
Icebird - Thu Oct 09, 2008 4:19 am
Post subject:
Ok, the PATH_MAX is gone. The output starts this way now:

Code: Show/Hide

make
gcc -std=gnu99 -pipe -I. -Iinclude -I/usr/include/linux -I../build  -D_REENTRANT -D_GNU_SOURCE -fPIC -g -Wall   -c -o ../build/main.o main/main.c
In file included from /usr/include/stdio.h:76,
                 from main/main.c:6:
/usr/include/libio.h:332: Fehler: expected specifier-qualifier-list before ?size_t?
/usr/include/libio.h:364: Fehler: expected declaration specifiers or ?...? before ?size_t?
/usr/include/libio.h:373: Fehler: expected declaration specifiers or ?...? before ?size_t?

...


btw, /usr/include also contains a limits.h but it does not define PATH_MAX.
Dr Brain - Thu Oct 09, 2008 6:32 am
Post subject:
Try changing it from -I/usr/include/linux to -isystem/usr/include/linux. I'm just stabbing in the dark at this point.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group