igormarfin / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Compiling "test" program fails on gcc 4.7 #167

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
To be honest I do not know if this is a problem with gcc, shedskin, or my 
system. But I figure I will bring it up and let your decide. 

I have gcc 4.6 and 4.7 and when setting up shedskin I ran the test compile for 
the included test.py.  I have not used any custom flags etc. outputted code 
will compile fine under gcc 4.6 but fails to compile when using gcc 4.7. I have 
attached the output of running 'make' command, first with gcc 4.7 and then with 
4.6 to he give you an idea of what is going on and weather or not it is a 
problem with shedskin or not.

What steps will reproduce the problem?
1. python setup.py install
2. shedskin test.py
3. make

What is the expected output? What do you see instead?
The test binary, see attached. 

What version of the product are you using? On what operating system?
0.9.1
Ubuntu 12.04

Original issue reported on code.google.com by mos4...@gmail.com on 3 May 2012 at 8:35

Attachments:

GoogleCodeExporter commented 8 years ago
thanks! it looks like I have some work to do for shedskin to work with gcc 
4.7.. :-) I will see if I can also install 4.7 under my 12.04 to have a look 
before the 0.9.2 release later this week.

Original comment by mark.duf...@gmail.com on 3 May 2012 at 8:45

GoogleCodeExporter commented 8 years ago
couldn't figure out how to easily install 4.7 under 12.04, so I just had a good 
look at the errors. I think I just fixed the 'intptr_t' problem (for 4.7 it 
seems we have to explicitly include stdint.h).

http://gitorious.org/shedskin/mainline/commit/ad2581023bedb38ec86d8528697de21913
a42c87

will have a look at the other errors today.

Original comment by mark.duf...@gmail.com on 5 May 2012 at 11:03

GoogleCodeExporter commented 8 years ago
alright, made two more changes which should hopefully avoid the errors for 
___min and __divs. could you try again please? :)

if these work, it seems there's still the problem of ::isatty not being 
declared. it's hard for me to look at this without 4.7, but it seems it's 
because unistd.h is included inside the 'std' namespace.. does it work for you 
if you replace ::isatty by std::isatty perhaps? and what happens if you just 
include unistd.h, without the namespace..?

Original comment by mark.duf...@gmail.com on 5 May 2012 at 11:39

GoogleCodeExporter commented 8 years ago
O, you can easily install gcc4.7 in ubuntu using  ppa:ubuntu-toolchain-r/test 
(See https://wiki.ubuntu.com/ToolChain)

Original comment by mos4...@gmail.com on 11 May 2012 at 12:32

GoogleCodeExporter commented 8 years ago
The command is, sudo add-apt-repository ppa:ubuntu-toolchain-r/test

I will pull and test your changes when I get a little free time (Hopefully this 
weekend)

Original comment by mos4...@gmail.com on 11 May 2012 at 12:36

GoogleCodeExporter commented 8 years ago
ah, thanks for the command! I was able to test with 4.7 now, and made all the 
tests work in git.. :-) checking the example programs now..

Original comment by mark.duf...@gmail.com on 11 May 2012 at 9:10