[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - Build failed on Ubuntu 14.04

Build failed on Ubuntu 14.04

Q&A's, tips, howto's

Build failed on Ubuntu 14.04

Postby csfreebird » Sat Apr 19, 2014 1:16 pm

csfreebird
 
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing

Re: Build failed on Ubuntu 14.04

Postby hugh.jf.chen » Sat Apr 19, 2014 2:18 pm

I met the same problem when I'd tried to build 10.6.0 under archlinux with the same version of gcc. Forturnately,I found this: http://pastebin.com/bY4hjEfZ. I'm wondering if all linux distributions with gcc 4.8.2 have the smae problem. If yes,I think a patch need to be provided.
hugh.jf.chen
 
Posts: 7
Joined: Sun Aug 11, 2013 3:50 pm

Re: Build failed on Ubuntu 14.04

Postby csfreebird » Sat Apr 19, 2014 2:57 pm

csfreebird
 
Posts: 107
Joined: Tue Jan 15, 2013 11:54 am
Location: China, Beijing

Re: Build failed on Ubuntu 14.04

Postby Lutz » Sat Apr 19, 2014 6:02 pm

Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Build failed on Ubuntu 14.04

Postby t3o » Tue Aug 05, 2014 8:22 pm

Hi,

adding the two typedefs helped to make 10.0.6 compile from source without errors on 14.04.

But I get an error when doing "make test":

...
>>>>> Time per proxy trip: 70 micro seconds
>>>>> Message API tested SUCCESSFUL
>>>>> ERROR in big integer/float conversion
make[1]: *** [check] Error 255


regards
t3o
t3o
 
Posts: 7
Joined: Tue Dec 11, 2012 9:50 pm

Re: Build failed on Ubuntu 14.04

Postby Lutz » Tue Aug 05, 2014 8:54 pm

Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Build failed on Ubuntu 14.04

Postby t3o » Tue Aug 05, 2014 9:02 pm

Hi Lutz

t3o@pux:build/newlisp/newlisp-10.6.0% ./newlisp qa-specific-tests/qa-bigint
6,24444261148445e+48 6,24444261148445e+48 0
>>>>> ERROR in big integer/float conversion

t3o@pux:build/newlisp/newlisp-10.6.0% cat /proc/cpuinfo | grep "model name"
model name : AMD E1-2500 APU with Radeon(TM) HD Graphics
model name : AMD E1-2500 APU with Radeon(TM) HD Graphics

t3o@pux:build/newlisp/newlisp-10.6.0% uname -a
Linux pux 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Hope that helps
t3o
t3o
 
Posts: 7
Joined: Tue Dec 11, 2012 9:50 pm

Re: Build failed on Ubuntu 14.04

Postby t3o » Tue Aug 05, 2014 9:11 pm

When running the test again I get the same numbers all the time:

6,24444261148445e+48 6,24444261148445e+48 0

I expected to get a different number on each call of (set 'f (pow (random 10 100) (+ 15 (rand 50)))) but probably I do not know enough about newlisp.

And... the test says 0 is bad. But an error of 0 ist the best you can get.. (not?)

t3o
t3o
 
Posts: 7
Joined: Tue Dec 11, 2012 9:50 pm

Re: Build failed on Ubuntu 14.04

Postby Lutz » Tue Aug 05, 2014 9:17 pm

It's running fine. The problem is in the qa-bigint code when comparing floats on the AMD platform.

The two floats printed out are the same and the difference is 0. So everything is fine. I have to change the small float value when comparing to 0.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Build failed on Ubuntu 14.04

Postby t3o » Wed Aug 06, 2014 5:29 am

Hi Lutz

thanks so far.

I know that the following is not "Build failed" any more but I started this second diskussion above.

What about (random x y) returning the same number with each program run?
Is that wanted behaviour? (and: is it a good test?)

Here's a small test program:

t3o@pux:build/newlisp/newlisp-10.6.0% cat random | nl
1 (println (random 10 10000))
2 (exit)

t3o@pux:build/newlisp/newlisp-10.6.0% for i in 1 2 3 4; do ./newlisp random ; done
8411,8771715471
8411,8771715471
8411,8771715471
8411,8771715471

Another test:

t3o@pux:build/newlisp/newlisp-10.6.0% cat random2 | nl
1 (println (random 10 10000))
2 (println (random 10 10000))
3 (println (random 10 10000))
4 (exit)

And it prints the same three "random" numbers on each run:

t3o@pux:build/newlisp/newlisp-10.6.0% for i in 1 2 3 4; do ./newlisp random2 ; done
8411,8771715471
3953,82926819093
7840,99223758606
8411,8771715471
3953,82926819093
7840,99223758606
8411,8771715471
3953,82926819093
7840,99223758606
8411,8771715471
3953,82926819093
7840,99223758606

That reminds me of http://www.xkcd.com/221/ :-)

I am still new to newlisp but from my > 30 year programming experience point of view I did not expext to get the same three numbers on each program run..

Greetings
t3o
t3o
 
Posts: 7
Joined: Tue Dec 11, 2012 9:50 pm

Re: Build failed on Ubuntu 14.04

Postby Lutz » Wed Aug 06, 2014 1:58 pm

newLISP uses a pseudorandom number generator (PRNG) which produces the same sequence on every program run. During the run of the program, repeated calling rand produces numbers in a random appearing order. On each new run the sequence is repeated. To start a different sequence use the seed function.

The ability to repeat random number sequences is important for debugging modeling and simulation applications. The seed function lets you choose either another sequence or repeat the same during the same program run.

For a more thorough discussion of this topic see: http://www.random.org/randomness/ and here: http://en.wikipedia.org/wiki/Pseudorand ... _generator
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests

cron