MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
[Solved] CryptoPP.cc:3431 and cxxflags?

 
Post new topic   Reply to topic    MLDonkey Forum Index -> Alternative platforms
View previous topic :: View next topic  
Author Message
Tokka
neophyte


Joined: 06 Jun 2008
Posts: 18
Location: Italy

PostPosted: Wed Jul 03, 2013 5:09 pm    Post subject: [Solved] CryptoPP.cc:3431 and cxxflags? Reply with quote

Hi all, i'm tring to run mldonkey on a cubieboard (armhf - armv7l) with linaro (kernel 3.4.24-a10-aufs+), but if i use repo's version (3.1.2) or if i compile by myself (3.1.3) i have always this error:
Quote:
mlnet: src/utils/lib/CryptoPP.cc:3431: void CryptoPP::RecursiveMultiplyTop(CryptoPP::word*, CryptoPP::word*, const word*, const word*, const word*, unsigned int): Assertion `carry >= 0 && carry <= 2' failed.


Searching the net, i found that i have to change cxxflags from "-02" to "-0s", but i've not found where (and how) i can do this change.
I'm not really sure this may works, but is the only solution i have found.
Could someone tell me how to change this parameter?
Thanks in advance Smile
Tokka


Last edited by Tokka on Sun Jul 07, 2013 12:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 582

PostPosted: Thu Jul 04, 2013 2:39 am    Post subject: Reply with quote

After ./configure run there will be the file config/Makefile.config, try tweaking CXXFLAGS variable in it. Don't forget to report back on the effect, please!
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
Tokka
neophyte


Joined: 06 Jun 2008
Posts: 18
Location: Italy

PostPosted: Fri Jul 05, 2013 2:59 pm    Post subject: Reply with quote

Hi Ygrek, thanks for your answer Smile
At the moment, result is this, on same hw (cubieboard):

-with ubuntu quantal, kenrl 3.0.57: works without problem;

-with debian wheezy (raspbian), kernel 3.4.24: same, works well;

-with ubuntu linaro, kernel 3.4.24:
from repos (version 3.1.2) don't works (error in the title);
version 3.1.3.tar.bz2 don't find installed ocaml, and don't find self-downloaded ocaml too, so don't finish to compile;
version 3.1.3 from cvs, give me this error: 'Camlp4: Uncaught exception: DynLoader.Error ("./build/bitstring.cma", "interface mismatch on String")'...but find installed ocaml Very Happy
I start to think that this linaro version may be unusable Confused
If you want, i could try other test, otherwise i may try another linaro version (not the one from berryboot, but made by an user) with kernel 3.4.43.

Let me know
Regards
Tk
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 582

PostPosted: Fri Jul 05, 2013 4:29 pm    Post subject: Reply with quote

Looks like something is wrong with the environment. Please show (pastebin) configure and build log when it fails to compile.
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
Tokka
neophyte


Joined: 06 Jun 2008
Posts: 18
Location: Italy

PostPosted: Fri Jul 05, 2013 5:58 pm    Post subject: Reply with quote

Here is config.log: http://pastebin.com/xN7Lxbnw

and here the make output (i've not found a build.log file Embarassed ): http://pastebin.com/iQYMQc64

Let me know if i can upload other infos
Many thanks Smile
Tk
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 582

PostPosted: Sat Jul 06, 2013 3:52 pm    Post subject: Reply with quote

AFAICS the problem is that you've got several ocaml installations (one in /usr/lib/ocaml another one in /usr/local/) and configure script (wrongly) picks up both and then build process bails out because of incompatible versions conflict. Please remove one ocaml and try from scratch, meanwhile I will have a look at configure script
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
Tokka
neophyte


Joined: 06 Jun 2008
Posts: 18
Location: Italy

PostPosted: Sun Jul 07, 2013 12:49 pm    Post subject: Reply with quote

Bingoooo Very Happy
Cleaned ocaml, now it works Very Happy Very Happy Very Happy
After clean, make give me this error:
Quote:
sh: 1: camlp4of: not found

to solve must install camlp4-extra
Quote:
sudo apt-get install camlp4-extra

and after that, it compile core without problems Very Happy

I confirm this bug: https://bugs.launchpad.net/ubuntu/+source/mldonkey/+bug/1060007

and the solution too. Changing cflags and cxxflags from -02 to -0s it works
from the mldonkey cvs folder:
Quote:
nano config/Makefile.config

and change the values:

Quote:
LIBS=-lz
CFLAGS=-g -O2
CPPFLAGS=
CXXFLAGS=-g -O2
.....



to
Quote:

LIBS=-lz
CFLAGS=-g -Os
CPPFLAGS=
CXXFLAGS=-g -Os
....



Here you can find the compiled core (armhf core 3.1.3):
wget http://tokka.altervista.org/downloads/cubieboard/mlnet
(useful if you want to install mld from repo, and simply replace /usr/bin/mlnet)

and the complete package:
http://tokka.altervista.org/downloads/cubieboard/mldonkey-armhf.tar.gz

Thanks a lot Ygrek Very Happy
Cheers
Tk
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 582

PostPosted: Sun Jul 07, 2013 5:58 pm    Post subject: Reply with quote

Ok, thanks for testing this. BTW (as I just figured out) the "correct" way to override CXXFLAGS is ./configure CXXFLAGS=-Os , just in case :)

spiralvoice, I tried to update configure to override CXXFLAGS defaults on armhf but failed because autoreconf here generates unusable configure.

Error is:
Code:

./configure: line 9266: syntax error near unexpected token `-fno-omit-frame-pointer,cv_no_omit_frame_pointer,'
./configure: line 9266: `     ACX_CHECK_CXX_FLAGS(-fno-omit-frame-pointer,cv_no_omit_frame_pointer, CRYPTOPPFLAGS="-fno-omit-frame-pointer")'


and looking at the diff I can see that autoreconf removed ACX_CHECK_CXX_FLAGS from aclocal.m4. This is GNU Autoconf version 2.69 on debian wheezy.

My idea was to add the following snippet before AC_PROG_CXX :

Code:

# GCC miscompiles cryptopp.cc with -O2 on armhf
# http://mldonkey.sourceforge.net/phpBB2/viewtopic.php?p=32309#32309
# https://bugs.launchpad.net/ubuntu/+source/mldonkey/+bug/1060007
  case "$host" in
  armv7l-*-linux-gnueabihf) : ${CXXFLAGS="-Os"} ;;
  esac


_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
Tokka
neophyte


Joined: 06 Jun 2008
Posts: 18
Location: Italy

PostPosted: Mon Jul 08, 2013 12:26 am    Post subject: Reply with quote

ygrek wrote:
Ok, thanks for testing this. BTW (as I just figured out) the "correct" way to override CXXFLAGS is ./configure CXXFLAGS=-Os , just in case Smile


I tried this way in my first attempts, but it give me some errors, for this reason i installed serveral ocaml (due to fact that it don't find all times).

But i will keep in mind your suggestion, i always have to learn.
Thanks a lot Smile
Tk
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3997
Location: Germany

PostPosted: Sun Feb 23, 2014 6:00 pm    Post subject: Reply with quote

ygrek wrote:
My idea was to add the following snippet before AC_PROG_CXX :

Does adding your snippet after AC_PROG_CXX work better?
Please try the patch attached here: https://savannah.nongnu.org/patch/index.php?8350
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3997
Location: Germany

PostPosted: Sun Feb 23, 2014 6:35 pm    Post subject: Reply with quote

While lurking around for other MLDonkey patches created by package maintainers I found these additional patches for CryptoPP, please test:

https://savannah.nongnu.org/patch/index.php?8351
https://savannah.nongnu.org/patch/index.php?8352
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 582

PostPosted: Sun Mar 02, 2014 6:17 pm    Post subject: Reply with quote

Builds ok with all three patches (linux amd64).
_________________
Download | Report bugs | git mirror
Back to top
View user's profile Send private message Visit poster's website
spiralvoice
Sage


Joined: 06 Jan 2003
Posts: 3997
Location: Germany

PostPosted: Mon Mar 10, 2014 4:34 pm    Post subject: Reply with quote

ygrek wrote:
Builds ok with all three patches (linux amd64).

committed to CVS, thanks for testing!
_________________
Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Alternative platforms All times are GMT
Page 1 of 1

 
Jump to:  
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


Sourceforge.net Logo