View Issue Details

IDProjectCategoryView StatusLast Update
0000761XdebugUncategorizedpublic2011-12-15 09:31
Reporterdrfugazi Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Platformsun4u sparcOSSolarisOS Version10
Product Version2.1.0 
Summary0000761: xdebug 2.1.2 - undefined symbol: NAME_MAX acomp failed for usefulstuff.c on Solaris 10
Description

Compilation failed on Solaris 10 with SunStudio 12u1 and xdebug-2.1.2:

line 440: undefined symbol: NAME_MAX
cc: acomp failed for /home/soft/php/xdebug-2.1.2/usefulstuff.c
*** Error code 1
dmake: Fatal error: Command failed for target `usefulstuff.lo'

Steps To Reproduce

% /usr/local/php52/bin/phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions

% ./configure --enable-xdebug --with-php-config=/usr/local/php52/bin/php-config

% dmake
/bin/bash /home/soft/php/xdebug-2.1.2/libtool --mode=compile cc -I. -I/home/soft/php/xdebug-2.1.2 -DPHP_ATOM_INC -I/home/soft/php/xdebug-2.1.2/include -I/home/soft/php/xdebug-2.1.2/main -I/home/soft/php/xdebug-2.1.2 -I/usr/local/php52/include/php -I/usr/local/php52/include/php/main -I/usr/local/php52/include/php/TSRM -I/usr/local/php52/include/php/Zend -I/usr/local/php52/include/php/ext -I/usr/local/php52/include/php/ext/date/lib -DHAVE_CONFIG_H -O -xs -xstrconst -zlazyload -c /home/soft/php/xdebug-2.1.2/xdebug.c -o xdebug.lo
mkdir .libs
...
cc -I. -I/home/soft/php/xdebug-2.1.2 -DPHP_ATOM_INC -I/home/soft/php/xdebug-2.1.2/include -I/home/soft/php/xdebug-2.1.2/main -I/home/soft/php/xdebug-2.1.2 -I/usr/local/php52/include/php -I/usr/local/php52/include/php/main -I/usr/local/php52/include/php/TSRM -I/usr/local/php52/include/php/Zend -I/usr/local/php52/include/php/ext -I/usr/local/php52/include/php/ext/date/lib -DHAVE_CONFIG_H -O -xs -xstrconst -zlazyload -c /home/soft/php/xdebug-2.1.2/xdebug_xml.c -KPIC -DPIC -o .libs/xdebug_xml.o
/bin/bash /home/soft/php/xdebug-2.1.2/libtool --mode=compile cc -I. -I/home/soft/php/xdebug-2.1.2 -DPHP_ATOM_INC -I/home/soft/php/xdebug-2.1.2/include -I/home/soft/php/xdebug-2.1.2/main -I/home/soft/php/xdebug-2.1.2 -I/usr/local/php52/include/php -I/usr/local/php52/include/php/main -I/usr/local/php52/include/php/TSRM -I/usr/local/php52/include/php/Zend -I/usr/local/php52/include/php/ext -I/usr/local/php52/include/php/ext/date/lib -DHAVE_CONFIG_H -O -xs -xstrconst -zlazyload -c /home/soft/php/xdebug-2.1.2/usefulstuff.c -o usefulstuff.lo
cc -I. -I/home/soft/php/xdebug-2.1.2 -DPHP_ATOM_INC -I/home/soft/php/xdebug-2.1.2/include -I/home/soft/php/xdebug-2.1.2/main -I/home/soft/php/xdebug-2.1.2 -I/usr/local/php52/include/php -I/usr/local/php52/include/php/main -I/usr/local/php52/include/php/TSRM -I/usr/local/php52/include/php/Zend -I/usr/local/php52/include/php/ext -I/usr/local/php52/include/php/ext/date/lib -DHAVE_CONFIG_H -O -xs -xstrconst -zlazyload -c /home/soft/php/xdebug-2.1.2/usefulstuff.c -KPIC -DPIC -o .libs/usefulstuff.o
"/home/soft/php/xdebug-2.1.2/usefulstuff.c", line 372: warning: initializer will be sign-extended: -1
"/home/soft/php/xdebug-2.1.2/usefulstuff.c", line 440: undefined symbol: NAME_MAX
cc: acomp failed for /home/soft/php/xdebug-2.1.2/usefulstuff.c
*** Error code 1
dmake: Fatal error: Command failed for target `usefulstuff.lo'

Additional Information

Version 2.1.1 compiles successfully
Version 2.1.2 after quick and dirty hack compiles too

% diff -u xdebug-2.1.2/usefulstuff.c xdebug-2.1.2-patched/usefulstuff.c
--- xdebug-2.1.2/usefulstuff.c 2011-07-28 13:13:03.000000000 +0200
+++ xdebug-2.1.2-patched/usefulstuff.c 2011-12-12 09:53:58.741662700 +0100
@@ -25,6 +25,7 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/file.h>
+#define NAME_MAX 48
#else
#define PATH_MAX MAX_PATH
#include <winsock2.h>

TagsNo tags attached.
Operating SystemSun Solaris 10
PHP Version5.2.10

Activities

derick

2011-12-15 09:31

administrator   ~0001879

Hija!

This has already been fixed on github: https://github.com/derickr/xdebug/commit/70a6992405b6956a48c5d418fc86f800a20adbc7

I'll make a new release in a bit, but right now I'd advice you to use the xdebug_2_1 branch from github.

cheers,
Derick

Issue History

Date Modified Username Field Change
2011-12-15 08:11 drfugazi New Issue
2011-12-15 09:31 derick Note Added: 0001879
2011-12-15 09:31 derick Status new => resolved
2011-12-15 09:31 derick Resolution open => no change required
2011-12-15 09:31 derick Assigned To => derick
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized