Compile wxPython 2.4.0.7 under solaris with CC problems...

Hello everybody !

I've got some problems to compile wxPython (python setup.py build
install) under SunSolaris release 5.8 with CC (Sun Workshop 6 update 1
C++ 5.2).

First problem :
    when i do python setup.py build install, i had the error :
    " cc : no input file specified, no output generated"
    " error : command 'cc' failed with exit status 1"
So, i tried to use CC instead, by doing a ln -s /usr/bin/CC cc
Yeah ! That's it, it compiles.

But i have now 2 others problems... :frowning:
- CC compiler doesn't accept class functions declarations with ';;'. And
in helpers.h, DEC_PYCALLBACK macros (and others) are defined with
"#define DEC_PYCALLBACK(..) ... ;" The problem is that in windows.i (and
windows2/3.i), calls to these macros are done with
"DEC_PYCALLBACK(parameters...);". So after preprocessor, i have ";;"
after the declaration of my function... and CC compiler give me an
error...
How can i solve this problem without having to delete the ";" with ends
each DEC_... macro ??

- The last problem i had is that CC compiler does'nt accept auto-cast.
For example:
    char *test = malloc(10*sizeof(char));
    gives me an error.
    I must do a cast (char*) before the malloc --> char *test = (char*)
malloc(10*sizeof(char)); to have this line correct. And there are
several code lines written without this cast.... So I had to do it
manually... (boring....)

So... after hours spent to compile the wxPython, it finally worked ! :slight_smile:
!!!

But I think i'm not the only user using wxPython on solaris with CC, and
that some other people must have had these problems... I would like to
know how passing through theses problems (for not having to redo theses
boring manipulations with the future versions of wxPython...)

Best regards to the wxPython community !

Frederic PAUL

Frederic Paul wrote:

Hello everybody !

I've got some problems to compile wxPython (python setup.py build
install) under SunSolaris release 5.8 with CC (Sun Workshop 6 update 1
C++ 5.2).

First problem :
    when i do python setup.py build install, i had the error :
    " cc : no input file specified, no output generated"
    " error : command 'cc' failed with exit status 1"
So, i tried to use CC instead, by doing a ln -s /usr/bin/CC cc
Yeah ! That's it, it compiles.

Cool! As I mentioned in the BUILD.unix.txt distutils not using the C++ compiler by default is a pain, but this is a nice and easy solution.

But i have now 2 others problems... :frowning:
- CC compiler doesn't accept class functions declarations with ';;'. And
in helpers.h, DEC_PYCALLBACK macros (and others) are defined with
"#define DEC_PYCALLBACK(..) ... ;" The problem is that in windows.i (and
windows2/3.i), calls to these macros are done with
"DEC_PYCALLBACK(parameters...);". So after preprocessor, i have ";;"
after the declaration of my function... and CC compiler give me an
error...
How can i solve this problem without having to delete the ";" with ends
each DEC_... macro ??

That's probably the only way. Did you remove them from where the macros are used or from where they are defined? (The latter would be better.)

- The last problem i had is that CC compiler does'nt accept auto-cast.
For example:
    char *test = malloc(10*sizeof(char));
    gives me an error.
    I must do a cast (char*) before the malloc --> char *test = (char*)
malloc(10*sizeof(char)); to have this line correct. And there are
several code lines written without this cast.... So I had to do it
manually... (boring....)

So... after hours spent to compile the wxPython, it finally worked ! :slight_smile:
!!!

Do you have a patch you can send me? (For the ;'s too)

But I think i'm not the only user using wxPython on solaris with CC, and
that some other people must have had these problems... I would like to
know how passing through theses problems (for not having to redo theses
boring manipulations with the future versions of wxPython...)

It's been about a year since I built with Sun CC, and I don't think I've heard of anybody else using anything but GCC since then...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Hello Robin,

Here are joined the patches you asked for. I didn't tried these patches on
other systems... but for SunOS 5.8 with CC 5.2, it's OK!

Could you answer me to say that you got the patches to f.paul@netcourrier.com
?

Thanks in advance

Frederic PAUL

Robin Dunn a écrit :

patch_wxPython_SunOS_CC.tar.gz (136 KB)

···

Frederic Paul wrote:
> Hello everybody !
>
> I've got some problems to compile wxPython (python setup.py build
> install) under SunSolaris release 5.8 with CC (Sun Workshop 6 update 1
> C++ 5.2).
>
> First problem :
> when i do python setup.py build install, i had the error :
> " cc : no input file specified, no output generated"
> " error : command 'cc' failed with exit status 1"
> So, i tried to use CC instead, by doing a ln -s /usr/bin/CC cc
> Yeah ! That's it, it compiles.

Cool! As I mentioned in the BUILD.unix.txt distutils not using the C++
compiler by default is a pain, but this is a nice and easy solution.

>
> But i have now 2 others problems... :frowning:
> - CC compiler doesn't accept class functions declarations with ';;'. And
> in helpers.h, DEC_PYCALLBACK macros (and others) are defined with
> "#define DEC_PYCALLBACK(..) ... ;" The problem is that in windows.i (and
> windows2/3.i), calls to these macros are done with
> "DEC_PYCALLBACK(parameters...);". So after preprocessor, i have ";;"
> after the declaration of my function... and CC compiler give me an
> error...
> How can i solve this problem without having to delete the ";" with ends
> each DEC_... macro ??

That's probably the only way. Did you remove them from where the macros
are used or from where they are defined? (The latter would be better.)

>
> - The last problem i had is that CC compiler does'nt accept auto-cast.
> For example:
> char *test = malloc(10*sizeof(char));
> gives me an error.
> I must do a cast (char*) before the malloc --> char *test = (char*)
> malloc(10*sizeof(char)); to have this line correct. And there are
> several code lines written without this cast.... So I had to do it
> manually... (boring....)
>
> So... after hours spent to compile the wxPython, it finally worked ! :slight_smile:
> !!!

Do you have a patch you can send me? (For the ;'s too)

>
> But I think i'm not the only user using wxPython on solaris with CC, and
> that some other people must have had these problems... I would like to
> know how passing through theses problems (for not having to redo theses
> boring manipulations with the future versions of wxPython...)

It's been about a year since I built with Sun CC, and I don't think I've
heard of anybody else using anything but GCC since then...

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

To Robin Dunn :

erk... mailscan deleted the file containing the patches for solaris I joined
with my previous mail. Where can I send you the tar.gz ?

Frederic PAUL

Frederic Paul wrote:

To Robin Dunn :

erk... mailscan deleted the file containing the patches for solaris I joined
with my previous mail. Where can I send you the tar.gz ?

I got it on the last message.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!