install error on Solaris x86 64 bit

32 views
Skip to first unread message

Tim Wang

unread,
Oct 8, 2012, 4:37:35 PM10/8/12
to mlpy-g...@googlegroups.com
Hi,
I installed GSL and Python. but when I install mlpy, I got the following error:

mlpy/wavelet/uwt.c: In function 'uwt_uwt':
mlpy/wavelet/uwt.c:104: error: expected identifier or '(' before numeric constant
mlpy/wavelet/uwt.c:163: error: lvalue required as left operand of assignment
mlpy/wavelet/uwt.c:168: warning: cast to pointer from integer of different size
mlpy/wavelet/uwt.c:169: warning: cast to pointer from integer of different size
mlpy/wavelet/uwt.c: In function 'uwt_iuwt':
mlpy/wavelet/uwt.c:193: error: expected identifier or '(' before numeric constant
mlpy/wavelet/uwt.c:212: error: lvalue required as left operand of assignment
mlpy/wavelet/uwt.c:242: warning: assignment makes pointer from integer without a cast
mlpy/wavelet/uwt.c:243: warning: assignment makes pointer from integer without a cast
error: command 'gcc' failed with exit status 1

I have no idea how to fix the uwt.c file. Anyone can give me any hints?

Thanks a lot,
Tim

Stephen Kiazyk

unread,
Nov 12, 2012, 11:31:54 PM11/12/12
to mlpy-g...@googlegroups.com
I was having this issue as well. If you look at the source file at the location of the error, you'll notice its a declaration:

double *_X;

However, I think that some compilers/environments already have _X #defined as something else (in general, its bad practice to make variables with a leading underscore, since those names are technically reserved by the compiler).

Anyways, the solution was to just find/replace _X with another name that isn't reserved (I did X_X, which I think is appropriate :) ).  Note that this error is happening in two separate functions, but a global replace over the entire file will work since nothing else should match _X (assuming case-sensitive search).

Cheers,
- Stephen Kiazyk
Reply all
Reply to author
Forward
0 new messages