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

For other topics related to the FreeBASIC project or its community.
Provoni
Posts: 285
Joined: Jan 05, 2014 12:33
Location: Belgium

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

Postby Provoni » Aug 15, 2018 19:48

dafhi wrote:Provoni - simple change makes your rng more random

Code: Select all

Sub ShowBits32( p as any ptr, Newline As boolean = true)
 
  '' use ScreenRes w,h, 32
 
  Dim As ulong  I, AryFG(3), AryBG(3)
  var           oldcol = color()
  AryFG(0) = RGB(200,200,200)
  AryFG(1) = RGB(255,0,0)
  AryFG(2) = RGB(0,255,0)
  AryFG(3) = RGB(0,96,255)
  AryBG(0) = RGB(100,100,100)
  AryBG(1) = RGB(127,0,0)
  AryBG(2) = RGB(0,127,0)
  AryBG(3) = RGB(0,0,127)
  dim as ulong ptr  v = p
  For I = 0 To 3
    Color AryFG(I), AryBG(I)
    print bin(*v shr (24 - i*8), 8);
  Next
  If Newline Then Print
  color oldcol
End Sub

sub ShowBits64(p as any ptr, Newline As boolean = true)
  showbits32 p+4, false
  ShowBits32 p, newline
END SUB


function prov_rng as ulong  '' https://www.freebasic.net/forum/viewtopic.php?f=17&t=19095&start=375#p248261
    static as ulong ms_state:  ms_state=214013*((ms_state+2531011)shr 1)and -1
    return ms_state
End Function

screenres 800,600,32
for i as long = 1 to 50
  var l = prov_rng
  showbits64 @l
next
sleep

Thank you!
dafhi
Posts: 1220
Joined: Jun 04, 2005 9:51

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

Postby dafhi » Aug 15, 2018 23:24

'And -1' not needed
St_W
Posts: 1404
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Aug 27, 2018 22:49

The build machine is working again and new builds were already uploaded containing the latest changes in fbc by coderJeff and in the documentation (mostly) by fxm. As usual, find them at http://users.freebasic-portal.de/stw/builds/
deltarho[1859]
Posts: 1650
Joined: Jan 02, 2017 0:34
Location: UK

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

Postby deltarho[1859] » Aug 28, 2018 14:24

Thanks, St_W

I noticed that in the inc folder of fbc_win32_mingw_0515_2018-08-26 most of the files are dated 2014. On the other hand in the inc folder of fb-win32-gcc810 all the files are dated 03/06/2018. That struck me as being odd but there may be a good reason for this.

If that needs to be the case then we need to be careful when updating the gcc810 setup with a new fbc to make sure only newer files are copied from fbc to gcc810.
St_W
Posts: 1404
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Aug 28, 2018 22:44

deltarho[1859] wrote:I noticed that in the inc folder of fbc_win32_mingw_0515_2018-08-26 most of the files are dated 2014. On the other hand in the inc folder of fb-win32-gcc810 all the files are dated 03/06/2018. That struck me as being odd but there may be a good reason for this.
There's a simple explanation for this: That's the date when I set up the build jobs and obviously most of the files haven't changed since that. Despite the differing modification date the header files in the "old" and gcc810 packages should be equal.
deltarho[1859] wrote:If that needs to be the case then we need to be careful when updating the gcc810 setup with a new fbc to make sure only newer files are copied from fbc to gcc810.
To be honest I don't understand your usecase, but in general you shouldn't mix binaries built with different toolchains, if possible (those are (most of) the files in "bin" and "lib" directories as contained in my ZIP archives).
If you're looking for a tool to compare/merge folder structures with regard to the file contents, not only the date, e.g. have a look at this (free & open source): http://meldmerge.org/ (Personally I like "Beyond Compare" better, but there's no free version available)
deltarho[1859]
Posts: 1650
Joined: Jan 02, 2017 0:34
Location: UK

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

Postby deltarho[1859] » Aug 29, 2018 0:01

@St_W

I use WinFBE_Suite.

I have a folder called "F:\Downloads\WinFBE_Suite\FreeBASIC-1.06.0-win32" [1]
I then have "F:\Downloads\FBC Updates\fbc_win32_mingw_0515_2018-08-26" [2]

[1] is carved in stone and a copy made [3]

Both folders [1] and [2] have the same structure in them. Clearly [2] is a subset of [1] and it is a simple matter to copy [2] into [3] to give me 1.06.0 latest build.

Having done that the resulting folder is carved in stone and copied [4]

I also have "F:\Downloads\FBC Updates\fbc_win32_gcc810_0011_2018-08-26". [5] This folder also has the same structure within it as [1] and [2].

If I now copy [5] into [4] I should have, to my mind, the latest 1.06.0 build using gcc 8.1.

My aim is to have 1.06.0 as per WinFBE_suite, the latest 1.06.0 build using gcc 5.2 and the latest 1.06.0 build using gcc 8.1 ie [1], [3] and [4] respectively.

I am fairly confident that updating WinFBE_Suite to the latest 1.06.0 build as above is OK. ie [3]

Having read your post I am now wondering whether I am using fbc_win32_gcc810_0011_2018-08-26 correctly and if not what should I be doing with fbc_win32_gcc810_0011_2018-08-26?

I should add that I am well out of my comfort zone here and looking for a simple to way to achieve my aim.

Now, some people, if not most, will think that the above is a bit of a 'carry on' but I take the view that if you are going to bother to build the latest 1.06.0 and produce a gcc 8.1 then I will bother to use them. Of course, if [4] 'plays up' then I can use [3] and if that 'plays up' then I can use [1], which is WinFBE_Suite without any updating. From what I have read each version of gcc has seen an improvement with regard to optimization and it is that area that lifts FreeBASIC to be head and shoulders above PowerBASIC.
St_W
Posts: 1404
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Aug 29, 2018 11:31

All my Windows packages contain a standalone version of the compiler, which should work out-of-the-box (but does not include any headers/import-libraries for 3rd partly libs except those required for building the compiler itself).
So you can just use "fbc_win32_gcc810_..." instead of "fbc_win32_mingw_...". In your example you can simply copy [2] into [3] OR [5] into [3] to update WinFBE's compiler with "fbc_win32_mingw_..." / "fbc_win32_gcc810_...", respectively. No need to combine the two packages.
Additionally, copying one package over another will simply overwrite all relevant files and you'll be using the last one you copied (although I wouldn't recommend doing that). So you actually can't do anything wrong :-)
St_W
Posts: 1404
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Aug 29, 2018 11:54

btw, one can merge win32 and win64 packages. (but all you get is a shared include folder, as everything else is platform specific)
The "bin" and "lib" folders already use platform-specific subfolders, but there are a few other changes necessary:
- if using a standalone build (default for windows) rename "fbc.exe" e.g. to "fbc32.exe" and "fbc64.exe"
- if using gcc make sure its dependency "cc1.exe" is not in the same folder in 32/64-bit packages; e.g. move from "bin/libexec/gcc" to "bin/i686-w64-mingw32/bin/" and "bin/x86_64-w64-mingw32/bin/".

note: you can find out gcc's search dirs for cc1.exe by calling "gcc -print-search-dirs" on the command line and looking at the paths listed under "programs:"; hint: copy the output to a text editor and replace semicolon by newline to make the output more readable
example output for gcc included in my latest 64-bit gcc810 package:
programs:
D:/fbc_win64_gcc810_0010_2018-08-26/fbc_win64_mingw/bin/win64/../libexec/gcc/x86_64-w64-mingw32/8.1.0/
D:/fbc_win64_gcc810_0010_2018-08-26/fbc_win64_mingw/bin/win64/../libexec/gcc/
D:/fbc_win64_gcc810_0010_2018-08-26/fbc_win64_mingw/bin/win64/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/x86_64-w64-mingw32/8.1.0/
D:/fbc_win64_gcc810_0010_2018-08-26/fbc_win64_mingw/bin/win64/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/
deltarho[1859]
Posts: 1650
Joined: Jan 02, 2017 0:34
Location: UK

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

Postby deltarho[1859] » Aug 29, 2018 15:09

St_W wrote:btw, one can merge win32 and win64 packages.

I shall shy away from that. I prefer to keep things simple and stay with how WinFBE_Suite is set up.

I have hit a snag with the latest fbc build.

The following is taken from the head of existing code.

Code: Select all

Const _WIN32_WINNT = &h0602
Const FullBuffer = 131072
Const HalfBuffer = 65536
 
#Include Once "windows.bi"
#Include Once "win/bcrypt.bi"
#Inclib "bcrypt"
 
Type BCryptGenRandomProc As Function (Byval hAlgorithm As BCRYPT_ALG_HANDLE, Byval pbBuffer As PUCHAR, Byval cbBuffer As Ulong, Byval dwFlags As Ulong) As NTSTATUS
Private Function MyBCryptGenRandom(Byval hAlgorithm As BCRYPT_ALG_HANDLE, Byval pbBuffer As PUCHAR, Byval cbBuffer As Ulong, Byval dwFlags As Ulong) As NTSTATUS
   Dim hLib As HMODULE = LoadLibraryW("BCrypt.dll")
   If hLib = NULL Then Exit Function
   Dim pProc As BCryptGenRandomProc = Cast(BCryptGenRandomProc, GetProcAddress(hLib, "BCryptGenRandom")) ' OFFENDING LINE
   If pProc = NULL Then
      FreeLibrary hLib
      Exit Function   ' // Use GetLastError To retrieve the Error
   End If
   Function = pProc(hAlgorithm, pbBuffer, cbBuffer, dwFlags)
   FreeLibrary hLib
End Function

It compiles OK with the 04-Jul-2018 32 bit build but not the 27-Aug-2018 32 bit build.

With the latest 32 bit build, I get 'warning 43(0):Argument count mismatch' at OFFENDING LINE. That is a false error because we do not have an argument count mismatch.

Thanks, St_W, for helping me out here. I am sure that others who want to dabble with the latest builds, but were not sure how to go about it, will also find your comments helpful.

While I am at it, thanks to fxm for the latest FreeBASIC manual ( 29-Aug-2018 )

ADDED: I get the same error with the 32 bit build of "fbc_win32_gcc810_0011_2018-08-26". The culprit is fbc.exe itself. I changed that to the 04-Jul-2018 fbc.exe and gcc 8.1 is now working.
Last edited by deltarho[1859] on Aug 29, 2018 15:26, edited 1 time in total.
St_W
Posts: 1404
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Aug 29, 2018 15:24

deltarho[1859] wrote:With the latest 32 bit build, I get 'warning 43(0):Argument count mismatch' at OFFENDING LINE. That is a false error because we do not have an argument count mismatch.
Looks similar to the problem reported by José: viewtopic.php?f=3&t=26976
Sounds like a regression in the compiler (but I didn't take a closer look yet). Of course nightly builds aren't considered stable (although there were nearly no problems in the last years) and it's absolutely possible that they contain new issues (while others were fixed). fbc's testsuite doesn't seem to cover the problem as no tests failed.
deltarho[1859]
Posts: 1650
Joined: Jan 02, 2017 0:34
Location: UK

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

Postby deltarho[1859] » Aug 29, 2018 15:36

@St_W

I added to my last post and missed your last one. I didn't see José's post.

It is good to note that José tries the latest builds as well - the more folk that take a little time out doing so the merrier. <smile>

It is worth noting that I got an issue with the latest 32 bit build and José got an issue with the latest 64 bit build so both of them have 'thrown a wobbly'.
PaulSquires
Posts: 710
Joined: Jul 14, 2005 23:41
Contact:

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

Postby PaulSquires » Aug 29, 2018 18:25

St_W wrote:btw, one can merge win32 and win64 packages. (but all you get is a shared include folder, as everything else is platform specific)
The "bin" and "lib" folders already use platform-specific subfolders, but there are a few other changes necessary:
- if using a standalone build (default for windows) rename "fbc.exe" e.g. to "fbc32.exe" and "fbc64.exe"
- if using gcc make sure its dependency "cc1.exe" is not in the same folder in 32/64-bit packages; e.g. move from "bin/libexec/gcc" to "bin/i686-w64-mingw32/bin/" and "bin/x86_64-w64-mingw32/bin/".

Oh, I really like this idea... a lot.
I will experiment with changing the WinFBE_Suite to use one common compiler folder and rename the compilers 32/64 appropriately.
deltarho[1859]
Posts: 1650
Joined: Jan 02, 2017 0:34
Location: UK

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

Postby deltarho[1859] » Aug 29, 2018 19:49

PaulSquires wrote:Oh, I really like this idea... a lot.
I will experiment with changing the WinFBE_Suite to use one common compiler folder and rename the compilers 32/64 appropriately.

I thought that you might but I would rather see WinFBE_Suite set up that way rather than my mess with the current set up.

So, after you. <smile>

In future builds of WinFBE_Suite make sure that you 'flag up' the 28-Aug-2018 builds as not to be used - if a 1.06 goes down so does WinFBE_Suite.
fxm
Posts: 8424
Joined: Apr 22, 2009 12:46
Location: Paris (suburbs), FRANCE

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

Postby fxm » Sep 15, 2018 5:11

@St_W,

At http://users.freebasic-portal.de/stw/builds/, the new 'freebasic_manual.chm' was not compiled as normally (badly IMHO): small file of 320KB instead of about 1771 KB with a poor user interface (like only html), most of the missing pages, ...
fxm
Posts: 8424
Joined: Apr 22, 2009 12:46
Location: Paris (suburbs), FRANCE

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

Postby fxm » Sep 16, 2018 8:34

The last documentation build of this night is correct.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests