Singular
https://www.singular.uni-kl.de/forum/

A small trouble while compiling singular
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1579
Page 1 of 1

Author:  ssegvic [ Mon Dec 04, 2006 4:09 pm ]
Post subject:  A small trouble while compiling singular

Hello,

I had a small trouble while compiling Singular-3-0-2 with g++ 4.0.3:

gcc -O3 -w -fomit-frame-pointer -fPIC -I./h -I. -I/usr/local/Singular/ix86-Linux/include -DHAVE_CONFIG_H -c MP_Link.c
MP_Link.c: In function ‘MP_EndMsgReset’:
MP_Link.c:493: error: invalid lvalue in assignment
MP_Link.c:494: error: syntax error before ‘}’ token
MP_Link.c: In function ‘MP_InitMsg’:
MP_Link.c:965: error: invalid lvalue in assignment
MP_Link.c: In function ‘MP_SkipMsg’:
MP_Link.c:1011: error: invalid lvalue in assignment
make[1]: *** [MP_Link.o] Error 1

I solved it by changing line 988 of the file MP/MP.h:

Old code:

#define MP_ClearError(link) ((MP_Status_t) (link)->MP_errno = MP_Success)

Correction:

#define MP_ClearError(link) ((MP_Status_t) ((link)->MP_errno = MP_Success))

After that, the software compiled just fine,
and appears to run correctly.

Sinisa

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/