Retroshare fails to build on Debian testing 64

*nix specific usage questions

Re: Retroshare fails to build on Debian testing 64

Postby csoler » Thu Aug 30, 2012 2:31 pm

We'd be happy to make RS work for debian testing, but we havea problem:

Apparently debian testing (a.k.a sid, correct me if I'm wrong) is running libupnp v1.6.17, but has patched libupnp so that it behaves like version >= 1.8.0, which
prevents implicit cast of some strings into char*.

Because older ubuntu versions than 12.04 use upnp version 1.6.17, we need to keep it compatible, which needs us to do a
Code: Select all
#ifdef VERSION >= 1.6.17

The patched version of upnp that debian uses makes the compiler fall into the wrong #ifdef, so the compilation does not work.

We can make this work with debian testing, if there exist a pre-compilation variable to detect debian, i.e. we can do something like:
Code: Select all
#ifdef DEBIAN && VERSION >= 1.6.17 || VERSION >= 1.8.0

Apparenty, "#ifdef DEBIAN" does not work. Anyone here knows which variable to use?

More info here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=353169, and here http://ftp.de.debian.org/debian/pool/ma ... ian.tar.gz
thankx
C.
csoler
 
Posts: 319
Joined: Tue Oct 28, 2008 10:33 am

Re: Retroshare fails to build on Debian testing 64

Postby kalixa » Sat Sep 08, 2012 7:26 am

http://retroshare.sourceforge.net/wiki/ ... nixCompile

work's like a charm ! (on my crunchbang)
kalixa
 
Posts: 3
Joined: Sat Sep 08, 2012 7:25 am

Re: Retroshare fails to build on Debian testing 64

Postby apoapo » Thu Sep 13, 2012 6:35 pm

Could you update this thread when it works again? Ubuntu quantal seems to have problems compiling libretroshare also.

Any workaround i can use till official fixes? Right now i manged to cp missing libs to names of old libs so that RS thinks that needed libs are there, works :>

Unfortunately my package system refuses to update anything while dependecies are "forced away".
apoapo
 
Posts: 189
Joined: Sun Jan 10, 2010 12:55 pm

Re: Retroshare fails to build on Debian testing 64

Postby Distro » Thu Sep 13, 2012 7:56 pm

Have you tried adding “ DEBIAN” to libretroshare.pro on the line “DEFINES *= UBUNTU”?
Distro
 
Posts: 303
Joined: Sun Sep 04, 2011 7:33 pm

Re: Retroshare fails to build on Debian testing 64

Postby apoapo » Sat Sep 15, 2012 11:46 am

Ok, my fault, forget to mention that i am using quantal beta of Ubuntu 64bit.
My thought was that debian testing and ubuntu quantal beta should have similar package versions (like libupnp4 beeing replaced by libupnp6)

But i tried your suggestion without success.

This is my error for libretroshare compiled with qmake, makeclean, make -j2:


http://pastebin.com/3bCThhh2

//edit:

Pulled newest svn today and got it to another error with your "DEBIAN" string:

Code: Select all
make
g++ -c -m64 -pipe -g -fno-omit-frame-pointer -Wall -D_FILE_OFFSET_BITS=64 -O2 -fPIC -Wall -W -DQT_WEBKIT -DPQI_DISABLE_TUNNEL -DRS_USE_BITDHT -DDEBIAN -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I. -I../../libbitdht/src -I../libbitdht -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include/ -I../../openpgpsdk/src -I../openpgpsdk -I. -I/usr/include/openssl -I/usr/include/upnp -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -o temp/linux-g++-64/obj/rsloginhandler.o rsserver/rsloginhandler.cc
rsserver/rsloginhandler.cc: In static member function 'static bool RsLoginHandler::tryAutoLogin(const string&, std::string&)':
rsserver/rsloginhandler.cc:214:26: error: 'RsInitConfig' has not been declared
rsserver/rsloginhandler.cc:215:45: error: 'RsInitConfig' has not been declared
rsserver/rsloginhandler.cc: In static member function 'static bool RsLoginHandler::enableAutoLogin(const string&, const string&)':
rsserver/rsloginhandler.cc:411:60: error: request for member 'c_str' in 'RsLoginHandler::getAutologinFileName', which is of non-class type 'std::string(const string&) {aka std::basic_string<char>(const std::basic_string<char>&)}'
rsserver/rsloginhandler.cc:421:26: error: 'RsInitConfig' has not been declared
rsserver/rsloginhandler.cc:422:44: error: 'RsInitConfig' has not been declared
rsserver/rsloginhandler.cc: At global scope:
rsserver/rsloginhandler.cc:358:6: warning: unused parameter 'ssl_id' [-Wunused-parameter]
make: *** [temp/linux-g++-64/obj/rsloginhandler.o] Error 1



//edit2:

Ok, *appanding* DEBIAN works. I actually *replaced* UBUNTU by DEBIAN before... sorry for the noise!
apoapo
 
Posts: 189
Joined: Sun Jan 10, 2010 12:55 pm

Re: Retroshare fails to build on Debian testing 64

Postby Sentry » Sun Oct 14, 2012 6:33 pm

It would be nice if this could somehow be automated. I'm compiling RetroShare for my Raspberry Pi and writing a tutorial about it, and this requires manual modification of the libretroshare.pro file. I've replaced the line
Code: Select all
DEFINES *= UBUNTU

with
Code: Select all
DEFINES *= DEBIAN
DEFINES *= UPNP_VERSION=10617

which seems to be working now. Is there anyway the version of libupnp and Debian or Ubuntu can be detected automatically?
Code: Select all
lsb_release -i

returns "Distributor ID: Debian" for me
Sentry
 
Posts: 5
Joined: Sun Oct 14, 2012 6:28 pm

Re: Retroshare fails to build on Debian testing 64

Postby Sentry » Mon Oct 15, 2012 10:04 am

Correction, the above didn't work. But what worked was adding those lines after the Ubuntu line, not replacing it. And there is another bug as a result of hardcoded paths (see here).

So, compiling libretroshare worked when my libretroshare.pro looks like this around line 220:
Code: Select all
DEFINES *= UBUNTU
DEFINES *= DEBIAN
DEFINES *= UPNP_VERSION=10617
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")


I'll report back when it's completely compiled, with a full how-to ;)
Sentry
 
Posts: 5
Joined: Sun Oct 14, 2012 6:28 pm

Re: Retroshare fails to build on Debian testing 64

Postby cave » Sat Dec 01, 2012 9:44 pm

Sentry's howto for Raspberry Pi / Debian

http://sentryytech.blogspot.co.at/2012/ ... ry-pi.html

which worked for me in v.0.5.4c
cave
 
Posts: 109
Joined: Tue Nov 13, 2012 10:27 pm

Previous

Return to RetroShare for Linux and friends

Who is online

Users browsing this forum: No registered users and 0 guests

cron