Where can I get a Recent-Git-Build of FreeBASIC?

For other topics related to the FreeBASIC project or its community.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 04, 2018 21:05

One of the most frustating aspects of WinFBE is the Compiler Results message box which gives no indication of an issue. For example, an assembler failure will actually show File Size: 0 which we could easily not spot. What happens is the previous compile is still intact and that gets used. I first noticed this after a large edit which appeared to have been totally ignored.

What I am now getting is an apparent success according to the Compiler Results but the Compiler log file told me otherwise. To add insult to injury I had to open the output window to find CreateProcees was not found. I got an application output but that was having used the previous compile; done with gcc 5.2.0. It was gcc 8.1.0 that failed. I spotted this when I realised that the file sizes for 8.1.0 were identical to 5.2.0. I should say the file size had not changed because no compile actually occured.

To get told in front of us without having to mess about is to use poseidonFB. We get a message box advising a failure and an error: "gcc.exe: error: CreateProcess: No such file or directory.

I have mentioned this compile failure 'stealth mode' of WinFBE a couple of times. I am sorry Paul but I cannot work like this and will switch to poseidonFB until WinFBE reports failures in front of me and does not hide them and have Compiler Results indicate all is well.

gcc 8.1.0 32 is failing in both WinFBE and poseidonFB - I am getting the CreateProcess error.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 04, 2018 22:13

OK, found the problem.

In WinFBE_Suite

With 5.2.0 32 we have
bin\libexec\gcc\i686-w64-mingw32\5.2.0\cc1.exe

With 5.2.0 64 we have
bin\libexec\gcc\cc1.exe

This has always been the case comparing a FB32 install to "C:\Program Files (x86)" and a 'portable' FB64 to wherever.

However, when we put St_W's into WinFBE_Suite we have to do this

With 8.1.0 32 and 64
bin\libexec\gcc\cc1.exe

If 8.1.0 32 used the longer path we get into trouble.

Don't ask how I worked this out - I didn't work it out I just go into a forensic mode and turn over every stone.

My WinFBE5 and WinFBE8 now works as intended. I can then do 32 or 64 bit with either gcc 5.2.0 or gcc 8.1.0.

You guys who build our kit have my utmost admiration - I would end up in a straight jacket.
PaulSquires
Posts: 712
Joined: Jul 14, 2005 23:41
Contact:

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby PaulSquires » Jun 04, 2018 22:16

deltarho[1859] wrote:One of the most frustating aspects of WinFBE is the Compiler Results message box which gives no indication of an issue. For example, an assembler failure will actually show File Size: 0 which we could easily not spot. What happens is the previous compile is still intact and that gets used. I first noticed this after a large edit which appeared to have been totally ignored.
....
I have mentioned this compile failure 'stealth mode' of WinFBE a couple of times. I am sorry Paul but I cannot work like this and will switch to poseidonFB until WinFBE reports failures in front of me and does not hide them and have Compiler Results indicate all is well.

I will rectify it as soon as possible. Most likely I am not parsing the log file sufficiently for the assembling/linking error you are experiencing. Can you post the contents of the failing log file here (or email it to me)???? Also, I could easily test for a resulting zero filesize exe and report an error that way as well. I normally do not have my settings to show that popup compile results messagebox (I have "Hide successful compile results message" option checked).

Pop me whatever info you have that will point me in the right direction and I'll whip up the solution and post a new package.

Also, the gcc that I used in the WinFBE Suite is the one that the FB Help file points to on the FB SourceForge website to download. I did nothing special other than unzip the files into the predefined folder paths.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 04, 2018 23:31

Hi Paul. I am back to using WinFBE. I got a bit rattled there. <smile> WinFBE is my most favoured IDE, as was Jelly Fish Pro which I started to use way back 15 years ago. However, the failure reporting definitely needs looking at.

Earlier I got a Compiler Results message box indicating that all was well with a positive file size.

The logs said otherwise.
------------------------------------------------------------------------
FreeBASIC Compiler - Version 1.06.0 (06-03-2018), built for win32 (32bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
standalone
target: win32, 486, 32bit
compiling: F:\FreeBASIC\CryptoRnd\SmallTest.bas -o F:\FreeBASIC\CryptoRnd\SmallTest.c (main module)
compiling C: F:\Downloads\WinFBE_Suite8\FreeBASIC-1.06.0-win32\bin\win32\gcc.exe -m32 -march=i486 -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -masm=intel "F:\FreeBASIC\CryptoRnd\SmallTest.c" -o "F:\FreeBASIC\CryptoRnd\SmallTest.asm" -O3
gcc.exe: error: CreateProcess: No such file or directory
compiling C failed: 'F:\Downloads\WinFBE_Suite8\FreeBASIC-1.06.0-win32\bin\win32\gcc.exe' terminated with exit code 1
------------------------------------------------------------------------
As mentioned earlier I had to request that and only did so because I realised that something was very wrong.

PoseidonFB displays a very spartan message bos indicating a failed compile. The output window is not exactlty verbose either but it does say: "gcc.exe: error: CreateProcess: No such file or directory", which is enough to get us started.
Also, the gcc that I used in the WinFBE Suite is the one that the FB Help file points to on the FB SourceForge website to download. I did nothing special other than unzip the files into the predefined folder paths.

That worked fine. The paths for the "C:\Program Files (x86)" install and the FB64 'install' are slightly different. St_W's 8.1.0 packages use the FB64 method which gave a conflict with FB32. I doubt that St_W even saw that coming.

WinFBE_Suite is a gem. Having FB32 and FB64 next to each other makes updating both WinFB5 and WinFB8 very easy - I can be bang up to date in no time. The only problem now is when I have finished some stuff I will need to compile four binaries to see which one has the best performance. I read a report earlier comparing gcc 7.0, 6.3, 5.4 and 4.9. in some cases the later compilers fared the best with some tests but the earlier compilers fared better with other tests. For the most part the differences were marginal but in some cases it was quite marked. Life is getting too bleeding complicated.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 05, 2018 0:39

Here is a small test, with three runs per configuration. The app is encrypting a 100MB file. Actually there is a lot more going on than just encrypting but you don't need to know that. The timings are in milli-seconds.

532: gcc 5.2.0 32 bit
564: gcc 5.2.0 64 bit
832: gcc 8.1.0 32 bit
864: gcc 8.1.0 64 bit

The second row is file size.

Code: Select all

 532    564    832    864
153600 147456 149504 156160
 1012   1055   1017   1061
 1024   1095   1023   1026
 1063   1029   1026   1160

Look at those file sizes. We would not be able to second guess them and there is only a 6% spread.

Your mileage may differ but with my crypto work it appears that from a performance-wise pespective it does not make a blind bit of difference which of the four I use.

Note: -gen gcc -Wc -O3, Win10 Pro 64 , Intel i7-3770K
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 05, 2018 1:12

Random number generation ( going flat out ). Speeds in MHz.

Code: Select all

           532 564 832 864
CryptoRnd  533 476 527 538
PCG        495 485 305 974
MT         199 182 169 148

CryptoRnd is Windows dependent and PCG is platform independent. I prefer PCG because that is arithmetic based whereas CryptoRnd depends upon Windows supplying the numbers.

832 has the brakes on with PCG for some reason whereas 864 has turned on its after burners. 864 is pushing 1GHz and has to be one of the fastest on the planet. I ran that a few times because I did not believe it. gcc 8.1.0 64 has found a sweet spot and no mistake. We cannot second guess these results either.

I wonder what gcc 8.1.0 will do for you graphics guys.

Added: I have just added my Mersenne Twister. 532 is top dog and 864 is bottom dog. I didn't see that comimg. FB's MT 532 is 88MHz, BTW.
Last edited by deltarho[1859] on Jun 05, 2018 2:40, edited 3 times in total.
PaulSquires
Posts: 712
Joined: Jul 14, 2005 23:41
Contact:

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby PaulSquires » Jun 05, 2018 1:26

deltarho[1859] wrote:Earlier I got a Compiler Results message box indicating that all was well with a positive file size.

The logs said otherwise.
------------------------------------------------------------------------
FreeBASIC Compiler - Version 1.06.0 (06-03-2018), built for win32 (32bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
standalone
target: win32, 486, 32bit
compiling: F:\FreeBASIC\CryptoRnd\SmallTest.bas -o F:\FreeBASIC\CryptoRnd\SmallTest.c (main module)
compiling C: F:\Downloads\WinFBE_Suite8\FreeBASIC-1.06.0-win32\bin\win32\gcc.exe -m32 -march=i486 -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -masm=intel "F:\FreeBASIC\CryptoRnd\SmallTest.c" -o "F:\FreeBASIC\CryptoRnd\SmallTest.asm" -O3
gcc.exe: error: CreateProcess: No such file or directory
compiling C failed: 'F:\Downloads\WinFBE_Suite8\FreeBASIC-1.06.0-win32\bin\win32\gcc.exe' terminated with exit code 1
------------------------------------------------------------------------


That is interesting. The CreateProcess error is the result of FBC trying (and failing) to invoke the GCC compiler (cc1.exe). You can simulate the error by simply renaming your cc1.exe file to something else. So, I got the exact same error message and log as you experienced, however, the way that WinFBE responded to it (for me) was different than you. I did not get a popup successful messagebox. For me, the "Output Window" opened at the bottom of the editor screen, positioned itself to tab #1 ("Compiler Results") and displayed "compiling C FAILED: Error code 1" in the Description column of the Listview. Clicking on tab #2 ("Compiler Log File") then shows the log file printout similar to the one you posted.

So, the big question is, why would you get the phony successful compile popup messagebox and I did not. I need to find out what other factors exist for that to happen.

Here is the code from modCompile.inc that explicitly checks for linking error messages in the log file:

Code: Select all

      ' Check to see if linking failed
      If (Left(**wst_ucase, 6) = WSTR("ERROR!")) or _
         (left(**wst_ucase, 34) = "VERY SORRY, BUT GORC HAD A PROBLEM") Then
         FF_ListView_InsertItem( hLV, NumWarnings, 0, WStr("0") )
         FF_ListView_InsertItem( hLV, NumWarnings, 1, WStr("") )
         FF_ListView_InsertItem( hLV, NumWarnings, 2, WStr("compiling resource FAILED: Error Code 1") )
         NumErrors = NumErrors + 1
      elseIf (Left(**wst_ucase, 5) = WSTR("ERROR")) Then
         FF_ListView_InsertItem( hLV, NumWarnings, 0, WStr("0") )
         FF_ListView_InsertItem( hLV, NumWarnings, 1, WStr("") )
         FF_ListView_InsertItem( hLV, NumWarnings, 2, WStr("compiling FAILED: Error Code 1") )
         NumErrors = NumErrors + 1
      elseIf (Left(**wst_ucase, 19) = WSTR("COMPILING C FAILED:")) Then
         FF_ListView_InsertItem( hLV, NumWarnings, 0, WStr("0") )
         FF_ListView_InsertItem( hLV, NumWarnings, 1, WStr("") )
         FF_ListView_InsertItem( hLV, NumWarnings, 2, WStr("compiling C FAILED: Error Code 1") )
         NumErrors = NumErrors + 1
      end if
     
      If Instr(**wst_ucase, WSTR("LINKING FAILED:")) Then
         FF_ListView_InsertItem( hLV, NumWarnings, 0, WStr("0") )
         FF_ListView_InsertItem( hLV, NumWarnings, 1, WStr("") )
         FF_ListView_InsertItem( hLV, NumWarnings, 2, wst )
         NumErrors = NumErrors + 1
      End If
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 05, 2018 1:57

PaulSquires wrote:The CreateProcess error is the result of FBC trying (and failing) to invoke the GCC compiler (cc1.exe).

St_W's gcc 8.1.0 32 bit package was looking in the wrong place. When I corrected that with a 'directory shuffle' cc1.exe was located.
So, the big question is, why would you get the phony successful compile popup messagebox and I did not. I need to find out what other factors exist for that to happen

Yes, it is a big question. Big questions require us to rule nothing out. Making an erroneous assumption can keep us trapped for days. I am sure that you know that and have learned like me that saying "Nah, it cannot be that" and did not pursue that course when in fact it was that. <laugh>
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 05, 2018 20:41

Just had a compilation failure with a small piece of code using gcc 8.1.0 - I had to back off from '-gen gcc -Wc -O3' to '-gen gcc -Wc -O2'.

Mind you, we can get that with gcc 5.2.0 - '-O3' is pushing it.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 07, 2018 8:10

St_W wrote:If no problems are detected (please report any problems you encounter with the two custom builds above) I'll change the automated build configuration to use gcc 8.1.0 instead of gcc 4.9.0 (x86) / 4.8.2 (x64).

I have had a few issues so I would suggest 'holding fire' on the above - 8.1 was only released on 2nd May.

'I'm alright Jack' because I have both 5.2 and 8.1 on board.

Of course, we could go for 7.3 which was released on 25th Jan. This is still a big jump from 5.2.

Just as a matter of interest did it take long to do your custom builds. The reason I ask is that I am mindful of the contribution you, fxm and others make for the benefit of the community.

Added: The issues I was having was my fault. I 'tinkered' with some code that also made 5.2 fail. Doh!
Last edited by deltarho[1859] on Jun 08, 2018 19:14, edited 1 time in total.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 08, 2018 18:47

Here is a graphics comparison.

We create a window with a yellow background and then execute 6,720,000 random Psets. The result is a blue window - not always - sometimes there are some yellow pixels left.

The code uses FB's Mersenne Twister, my PCG32II and what I have called Infinity. Infinity Psets just one pixel to simulate a random number generator executing at 'light speed'.

Timings (in seconds):

Code: Select all

    5.2 32  5.2 64
Rnd 0.583   0.385
PCG 0.574   0.306
Inf 0.371   0.224
 
    8.1 32  8.1 64
Rnd 0.590   0.400
PCG 0.561   0.311
Inf 0.394   0.251

Fastest RND test is from 5.2 64 but not far behind 8.1 64
Fastest PCG test is from 5.2 64 but not far behind 8.1 64
Fastest infinity test is from 5.2 64.

Fastest generator is infinity, PCG and then RND. <laugh>

Code

Code: Select all

' Compile as GUI
#Include once "PCG32II.bas"
 
Dim as Long i, j
Dim as Double t
Dim Shared pcg As pcg32
 
screen 19, 32
Color RGB(0, 0, 255), RGB(255, 255, 0)
Cls
pcg.MyRandomize()
 
Randomize
 
j = 1
t = Timer
For i = 1 to 14*800*600
  PSet (Rnd*800, Rnd*600) ' Mersenne Twister
  'Pset (pcg.randse*800, pcg.randse*600)
  'pset (400, 300)
Next
t = Timer - t
 
Locate 1,1
Print "Done";" ";Str(t)
Sleep
Provoni
Posts: 289
Joined: Jan 05, 2014 12:33
Location: Belgium

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby Provoni » Jun 09, 2018 14:39

@deltarho[1859]

I really like your emphasis on the importance of speed with FreeBASIC and would like to speed test this new FreeBASIC version with my 64-bit multi-threaded substitution solver. Is there a download link that would work with FbEdit?

Also, a part of my program needs a high performance random number generator where the quality of the random numbers is not of the utmost importance.

Currently this is my implementation:

Code: Select all

ms_state=(214013*ms_state+2531011)and 2147483647
random_number=int(ms_state/2147483648*variable)

With your expertise of random number applications. Do you know of anything better/faster in this context? The "variable" could be a constant.
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 09, 2018 18:18

Provoni wrote:Is there a download link that would work with FbEdit?

Cannot help you with FBEdit - I don't use it.

Your implementation is slow. It looks like it outputs 0 to variable - 1.

Have a look at this. On my machine it is knocking out range values at 302MHz in 64 bit. It is also thread safe. The numbers generated are 'top drawer' but that is not important for you.

Added: "Your implementation is slow." I may be wrong on that - I am getting some weird results in 64 bit.
St_W
Posts: 1418
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby St_W » Jun 09, 2018 19:36

deltarho[1859] wrote:Just as a matter of interest did it take long to do your custom builds. The reason I ask is that I am mindful of the contribution you, fxm and others make for the benefit of the community.
I duplicated the existing build job and then adapted several configuration files to use the new compiler instead of the old one. After a few tries and some corrections the build configuration worked and creating a gcc810 fbc build is now only a matter of a mouse click (+ uploading the result).

I just skimmed the other posts since my last one and noted that you had some issues with cc1.exe, so some notes on that: cc1.exe is a part of gcc and used internally to do the actual C code compilation. cc1.exe and gcc.exe belong together, so it does not make sense to mix them from different gcc versions. Unfortunately the error message you get from gcc is not very clear, but actually a user should never see it as it's an internal configuration issue. You can see the search locations, where gcc.exe searches for cc1.exe by calling "gcc -print-search-dirs". e.g. for the gcc i included in my 32-bit package you'll get these folders, relative to the location of gcc.exe:
  • ../libexec/gcc/i686-w64-mingw32/8.1.0/
  • ../libexec/gcc/
  • ../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/i686-w64-mingw32/8.1.0/
  • ../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/
deltarho[1859]
Posts: 1651
Joined: Jan 02, 2017 0:34
Location: UK

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Postby deltarho[1859] » Jun 09, 2018 20:50

@St_W

The issues that I had were more to do with me not keeping things simple and when I got an issue I should have immediately droppd into 5.2 to make sure the issue wasn't there so I wasn't being very scientific.

I have done a lot more tests and I would say that 5.2 is a little faster than 8.1 but, overall, only marginally. The binaries produced by 8.1 are significantly smaller than those produced by 5.2. It would seem then we may have reached the plateau on speed but there has been scope on size.

This thread has pushing 50,000 views and that is a lot even considering that it started at the end of 2011. On the face of it there seems to be a lot of interest in the topic's subject. I would have thought that there would be as much interest in the version of gcc employed. Surprisingly, only I have responded to your post six days ago introducing 8.1.

My guess is that if you included 8.1 with FB then very few, if any, would thank you for it. If 8.1 proved to be not as stable as 5.2 I am sure members will be queuing up to rant. So, I would stay with 5.2 and if any member wanted 8.1 then they can do the same as I have done.

It would appear then that I do not have a good opinion of human nature. I can clear that up: I don't. <smile>

Return to “Community Discussion”

Who is online

Users browsing this forum: Steini63 and 3 guests