NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Install dbg-cli, binary and src both fail


Joined: 01 Mar 2010
Posts: 1
Reply with quote
For dbg-cli-2.15.5, the source won't compile and the binary won't run, as follows:

configure does not report any errors.
make reports numerous errors, mostly '...was not declared in this scope' (see full output below)
make install is of course not useful until the outcome of make improves.

I'm not a c programmer, but have done a fair bit of configure/make/make install (never had one go smoothly, but also never been my fault!). I can read only simple Makefiles, this one is too much for me.

The binary does not run on my machine: error while loading shared libraries: libreadline.so.4: cannot open shared object file: No such file or directory.
I did sudo ln -s /usr/lib/libreadline.so /usr/lib/libreadline.so.4 to try to dupe around this and got:
error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
And can't figure out what cheating to do for that.

Any pointers on how to resolve?

Sincerely,
Aleksander

My machine:
Ubuntu 8.10
kernel: 2.6.27-7
libtool: 2.2.4-0ubuntu4
automake: 1:1.10.1-3 (ie 1.10.x)
autoconf: 2.61-7ubuntu1
gcc: 4:4.3.1-1ubuntu2
glibc: 2.7-1 (but it's a virtual package, does not really exist. It points to libc6 2.8~20080505-0ubuntu9, but I'm not sure the implications of this for compiling, I expect there should be a softlink, but don't find one on this machine.

Output from make, as superuser via sudo:
make all-recursive
make[1]: Entering directory `/home/user/apps/php/dbg-cli-2.15.5-src'
Making all in dbgbase
make[2]: Entering directory `/home/user/apps/php/dbg-cli-2.15.5-src/dbgbase'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../ -DDBG_USE_STDALLOCA -g -O2 -c dbg_net.c
dbg_net.c: In function ‘SysError’:
dbg_net.c:483: warning: format not a string literal and no format arguments
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../ -DDBG_USE_STDALLOCA -g -O2 -c DbgSess.cpp
In file included from DbgSess.cpp:55:
../dbgbase/dbgbase_classes.h: In constructor ‘ThreadBase::ThreadBase()’:
../dbgbase/dbgbase_classes.h:400: error: ‘memset’ was not declared in this scope
In file included from DbgSess.cpp:59:
StrTable.h: In function ‘bool operator<(const std::string&, const std::string&)’:
StrTable.h:50: error: ‘strcmp’ was not declared in this scope
StrTable.h: In function ‘bool operator==(const std::string&, const std::string&)’:
StrTable.h:55: error: ‘strcmp’ was not declared in this scope
StrTable.h: In function ‘bool operator<=(const std::string&, const std::string&)’:
StrTable.h:59: error: ‘strcmp’ was not declared in this scope
DbgSess.cpp: In function ‘void get_local_ip_list(std::string&)’:
DbgSess.cpp:79: error: ‘strcpy’ was not declared in this scope
DbgSess.cpp:86: error: ‘memset’ was not declared in this scope
DbgSess.cpp:88: error: ‘memcpy’ was not declared in this scope
DbgSess.cpp: In function ‘HRESULT open_http_session(const SessRequest&, SessConnection&, std::string&)’:
DbgSess.cpp:193: error: ‘memset’ was not declared in this scope
DbgSess.cpp: In function ‘HRESULT open_cgi_session(const SessRequest&, SessConnection&, std::string&)’:
DbgSess.cpp:261: warning: deprecated conversion from string constant to ‘char*’
DbgSess.cpp:270: error: ‘PATH_MAX’ was not declared in this scope
DbgSess.cpp:272: error: ‘olddir’ was not declared in this scope
DbgSess.cpp:278: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result
make[2]: *** [DbgSess.o] Error 1
make[2]: Leaving directory `/home/user/apps/php/dbg-cli-2.15.5-src/dbgbase'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/apps/php/dbg-cli-2.15.5-src'
make: *** [all-recursive-am] Error 2
View user's profileFind all posts by akujbidaSend private message
dbg-cli-2.15.5-src - Fix the errors and recompile...


Joined: 24 Apr 2010
Posts: 1
Reply with quote
I ran into the same issues with the source not compiling, binary not running, exactly the same errors as Aleksander. Heh heh, I tried renaming the libreadline.so file too... Then I found Aleksander's post and knew recompilation was the only way.

I ended up fixing the source code by including limits.h, stdlib.h, string.h to the complaining files. It seems to work now and I'm able to debug simple php programs using the setup instructions found at patrickmin.com/linux/tip.php?name=php_debugger

I'm guessing that my fixes are unix specific and will break other platform builds (read windows). I'll make the fixed sources available if you let me know.

I wrote it up the fix at ordinarymlc.blogspot.com/2010/04/php-debugger-or-lack-thereof.html


Larry
ubuntu 9.10
View user's profileFind all posts by lkangSend private message


Joined: 24 May 2010
Posts: 1
Reply with quote
How I installed dbg (server) for php5 Ubuntu 9.10 Karmic 64-bit:

Code:

wget http://downloads.sourceforge.net/project/dbg2/dbg/2.15.5/dbg-2.15.5.tar.gz?use_mirror=iweb
tar zxvf dbg-2.15.5.tar.gz
cd dbg-2.15.5/
sudo aptitude install php5-dev
export phpize=`which phpize`
./deferphpize
cd modules/
sudo cp dbg.so /usr/lib/php5/20060613/
sudo vim /etc/php5/apache2/conf.d/dbg.ini
extension=dbg.so

[debugger]
debugger.enabled = true
debugger.profiler_enabled = true
debugger.JIT_host = clienthost
debugger.JIT_port = 9000
debugger.host_allow = 127.0.0.1
debugger.host_deny = ALL
:wq
sudo service apache2 restart




How I Installed dbg-cli (client) for php5 on Ubuntu 9.10 Karmic 64-bit:

Code:

wget http://downloads.sourceforge.net/project/dbg2/dbg-cli/2.15.5/dbg-cli-2.15.5-src.tar.gz?use_mirror=iweb
tar zxvf dbg-cli-2.15.5-src.tar.gz
cd dbg-cli-2.15.5-src/
sudo aptitude install libreadline-dev
sh ./configure
vim ./dbgbase/DbgSess.cpp ./dbgbase/DbgSpawn.cpp ./dbgbase/ListenerBase.cpp ./dbgbase/dbgbase_globals.cpp ./dbgbase/dbgbase_classes.h ./dbgbase/ParseEval.cpp ./dbgbase/UrlParse.cpp
/* prepend the following three lines to the top of this file and the remaining files */
#include "limits.h"
#include "stdlib.h"
#include "string.h"
:wn
make
sudo make install
which dbg-cli

vim ~/.dbgcli_init
set mode on
set mapurlroot http://mysite.local
set cgiexec /usr/bin/php
set maplocalroot /home/me/workspace/mysite.local/src/webroot
set mapremoteroot /home/me/workspace/mysite.local/src/webroot
set port 9000
:wq

# optional
sudo aptitude install ddd
ddd --debugger /usr/local/bin/dbg-cli

# browse to http://mysite.local/?DBGSESSID=1@clienthost:9000



... but i don't think it worked. there were a lot of warnings even though it compiled the binary. i can't get it to listen.
i also can't run the old pre-compiled binary. seems like u'd need an Ubuntu Breezy virtual machine or something--way way old and not maintained.
has anyone gotten dbg-cli working lately?
View user's profileFind all posts by mikesmullinSend private message
Install dbg-cli, binary and src both fail
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic