Compilation problems with original 'ready-to-use' environment based on gcc 3.4.6 - General Discussion and Assistance - CHDK Forum supplierdeeply

Compilation problems with original 'ready-to-use' environment based on gcc 3.4.6

  • 27 Replies
  • 5382 Views
Advertisements
In order to speed-up batch compiling, I have copied the pre-built compiling environment and my own project files to two faster PC's, one WinXP Pro SP3 and the other Win7 Home Premium.
I get the same problem with both.

However, to make the test less dependent on the project files on each PC, I have also tested with the files on a mini USB drive, to no avail.

The Makefile is far older than the CHDK version but works fine and is attached.
With the USB drive, topdir = H:\SDM_1.86_Mercurial

For convenience, I run from a BAT file in which  I have "gmake PLATFORM=s95 PLATFORMSUB=100k fir".

The first operation is 'version' and it responds with :-

**** Build: 148
i was unexpected at this time
gmake: ***[all-recursive] Error 255

The 'clean' command then runs and issues the same error.

If I connect the USB drive to my other WinXP PC and run the BAT file everything works fine.


Any ideas ?


David
« Last Edit: 17 / November / 2012, 18:55:08 by Microfunguy »

*

Offline reyalp

  • ******
  • 11900
the BUILD_NUMBER variable some how has ended up with a newline in it?
Don't forget what the H stands for.

version.inc contents have certainly been changing for some reason.

Sometimes everything appeared between inverted inverted commas, other times the version number disappeared.

Not sure why the BUILD_NUMBER is then echo'd back to version.inc.

Maybe a long time ago there was an option to increment build number that I removed.

Regardless,it works on other PC's.

I copied the pre-built environment folder to my DropBox and then copied from there on the other PC's.

I will try copying via a mini USB drive instead.
« Last Edit: 17 / November / 2012, 19:37:23 by Microfunguy »

Using a hex editor, I make sure the version.inc entry ends with 0x0A.

Running the BAT fails as above, BUILD_NUMBER displayed is empty.

In addition, version.inc has increased in size by one byte  ... a carriage return (0x0D) has been inserted before the 0x0a.

EDIT

Even when I remove the line that echo's to version.inc, it fails at the point where it displays BUILD_NUMBER.

It fails to detect BUILD_NUMBER.

Can it be anything to do with file permissions ?
« Last Edit: 17 / November / 2012, 21:22:44 by Microfunguy »


version.inc is just a plain text file and whether it ends in newline or carriage-return+newline shouldn't make any difference... I don't think it's failing in 'version'.   If your BAT file is not just the gmake one-liner, it might have something relevant.

Compare the output of 'path' on the working and non-working machines to see if there's a difference.
A810 1.00e

If your BAT file is not just the gmake one-liner, it might have something relevant.
@microfunguy : I was wondering that too - can you post your batch and makefile.inc  files?

Quote
Compare the output of 'path' on the working and non-working machines to see if there's a difference.
You might even go one step farther and compare the output of "set" to see if any environment variable are different ?
Ported :   A1200    SD940   G10    Powershot N    G16

See post below.
« Last Edit: 18 / November / 2012, 12:27:10 by Microfunguy »

SUCCESS !

The path to the gcc\bin folder was \gcc\bin\

It now works.

EDIT

But not with the faster Win 7 machine.

zsh fails on nearly every operation.
« Last Edit: 18 / November / 2012, 12:52:30 by Microfunguy »


*

Offline reyalp

  • ******
  • 11900
I believe the old gcc3 pre-built environment has never worked on vista or later. You can get a working gcc4 environment from chdkshell.

edit:
btw, if compile speed is your only concern, you will find linux much faster than windows, even on lower spec hardware or in a VM on the windows box. For example, my lowly 1.8ghz amd athlon laptop running linux builds faster than my win7 sandy bridge i5 desktop. Of course, setting up the build environment is likely to be a lot more work...
« Last Edit: 18 / November / 2012, 18:19:13 by reyalp »
Don't forget what the H stands for.

You can get a working gcc4 environment from chdkshell.

I installed it and tried doing the A620 100f build but it gave problems.
It tried to use the old 'zsh'  (renamed by GrAnd to 'sh') but zsh is unstable on Win 7 and 64-bit is not supported anyway.

So, I try installing the following simply to get the bash.exe executable :-

https://github.com/bmatzelle/gow/issues/59

Even though in makefile.inc I set SH = bash,  sh.exe (zsh) was used.

So, I renamed it sh.exe and when it got to the 'which' command :-

   SORT := $(dir $(shell which uniq.exe | sed 's_$(OLDSEPARATOR)_$(NEWSEPARATOR)_g'))/sort.exe

it simply displayed usage information an endless number of  times.


Quote
if compile speed is your only concern

Quote
you will find linux much faster than windows

Hmmmm  .. I sense a LOT of pain.
I may try it, I know someone who is quite expert with Linux and only yesterday suggested I install it.

For now, I just want to get gmake working with bash.exe.

« Last Edit: 18 / November / 2012, 18:37:22 by Microfunguy »

 

Related Topics