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

For other topics related to the FreeBASIC project or its community.
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

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

Postby MOD » Jun 11, 2014 20:10

Note: I'm not updating the link anymore unless it's necessary. My builds were made by hand and since St_W got his automatic builds running, there's no need for my builds anymore. Nevertheless, I won't delete the last version so the link will stay available until the end of the world. ;)
St_W
Posts: 1504
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Jun 11, 2014 22:16

Ok, a short summary: you are using some build by MOD - maybe an older version. That build works.
A current build, #95 (26.05.2014 20:26:12) by myself, does not work. You've posted the verbose compiler output of that compiler.

Let us determine, whether the linker (ld.exe) is called using the same parameters when using the working compiler (MOD's build). That will help us isolating the problem. It is either related to the linker (ld.exe) or to the FB-Compiler (fbc.exe). Of course the latter is more likely, but let's eliminate one or the other as source of the problem.

Therefore, please post the verbose compiler output (parameter -v) of the working compiler when using the same build command as used before for the verbose output of the apparently bugged FreeBasic build. That will contain the build date of the compiler, which will allow us to infer an approximate date of the used source code. If possible, also mention the version number of the linker (ld.exe) (use parameter --version) from the working compiler. Additionally please post the used build command, if possible.

Sorry for the trial & error procedure, but if you can't provide an example that triggers the error everything I can do is educated guessing and drawing conclusions from the results. Therefore please provide as detailed and correct information as you can.


//edit:

I've built a slightly modified version of the compiler, that may fix the problem: Please download from http://users.freebasic-portal.de/stw/files/tmp/fbc_mingw_custom01.zip and try whether that build fixes the problem.
Please still provide the information requested above in addition.
aloberoger
Posts: 495
Joined: Jan 13, 2009 19:23

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

Postby aloberoger » Jun 15, 2014 14:17

I notice that somebody else don't have this pb , firt can you compile this simple example please.

Code: Select all

#INCLUDE ONCE "windows.bi"
#INCLUDE ONCE "win\commctrl.bi"
#INCLUDE ONCE "win\commdlg.bi"

 #Define Show(Win)             RedrawWindow(Win,0,0,0):ShowWindow(Win,SW_SHOW)
#DEFINE SubclassWindow(h,f)        (CAST(WNDPROC, SetWindowLong(h,GWL_WNDPROC,CAST(DWORD, @f))))

 DIM SHARED g_hinstance as HINSTANCE
 DIM SHARED ghFont as HFONT

#DEFINE   ID_Scrollbar1       102
#DEFINE   ID_Scrollbar2       103

'***************************************************************
' Reserve memory space for each control that we'll create
'***************************************************************

DIM SHARED    Form1    AS    HWND
DIM SHARED    Scrollbar1    AS    HWND
DIM SHARED    Scrollbar2    AS    HWND

'**************************************************************
' Other variables & constants used by the program go here
'**************************************************************

DECLARE FUNCTION Form1_Proc ( byval hWnd as HWND, byval Msg as UINT, byval wParam as WPARAM, byval lParam as LPARAM ) as LRESULT


DECLARE SUB FORMLOAD()
' ========================================================================================
' Main
' ========================================================================================
Declare FUNCTION WINMAIN (BYVAL hInstance AS HINSTANCE, BYVAL hPrevInstance AS HINSTANCE, BYVAL lpszCmdLine AS ZString PTR, BYVAL nCmdShow AS LONG) AS LONG
 
End WinMain(GetModuleHandle(NULL),NULL,Command,SW_SHOW)

FUNCTION WINMAIN (BYVAL hInstance AS HINSTANCE, BYVAL hPrevInstance AS HINSTANCE, BYVAL lpszCmdLine AS ZString PTR, BYVAL nCmdShow AS LONG) AS LONG

   Dim hFont AS HFONT
   Dim wcex AS WNDCLASSEX
   Dim szClassName AS ZString * 80

   hFont = GetStockObject(ANSI_VAR_FONT)

   ' Register the window class
   szClassName        ="Form1"
   g_hinstance       = hInstance
   wcex.cbSize        = SIZEOF(WNDCLASSEX)
   wcex.style         = CS_HREDRAW OR CS_VREDRAW
   wcex.lpfnWndProc   = @Form1_Proc
   wcex.cbClsExtra    = 0
   wcex.cbWndExtra    = 0
   wcex.hInstance     = hInstance
   wcex.hCursor       = LoadCursor (NULL, BYVAL IDC_ARROW)
   wcex.hbrBackground = cast(HBRUSH,COLOR_3DFACE+1)
   wcex.lpszMenuName  = NULL
   wcex.lpszClassName = STRPTR(szClassName)
   wcex.hIcon         = LoadIcon (NULL, BYVAL IDI_APPLICATION) ' Sample, if resource icon: LoadIcon(hInst, "APPICON")
   wcex.hIconSm       = LoadIcon (NULL, BYVAL IDI_APPLICATION) ' Remember to set small icon too..
   RegisterClassEx @wcex


 FORMLOAD()

   ' Message handler loop
   Dim uMsg AS MSG
   While GetMessage(@uMsg, NULL, 0, 0)
      IF IsDialogMessage(Form1, @uMsg)=0 THEN
            TranslateMessage @uMsg
            DispatchMessage @uMsg
      END IF
   WEND

   FUNCTION = uMsg.wParam

END FUNCTION

SUB FORMLOAD()

 Form1 = CreateWindowEx(0,"Form1","Form1",WS_CAPTION Or WS_SYSMENU Or WS_BORDER Or  WS_MAXIMIZEBOX Or  WS_MINIMIZEBOX ,115,180,640,400,NULL,NULL,GetmoduleHandle(0),NULL)
 


 Scrollbar1 = CreateWindowEx(32,"ScrollBar","Scrollbar1",WS_CHILD Or WS_TABSTOP Or SBS_HORZ Or WS_CLIPSIBLINGS or WS_CLIPCHILDREN Or WS_VISIBLE , _
                         24,336,600,24,Form1,Cast(HMENU,102),GetmoduleHandle(0),NULL)

  'SendMessage(Scrollbar1, SBM_SETRANGE,0,120)
  SendMessage(Scrollbar1, SBM_SETRANGE,0,120)
      Dim SIF As SCROLLINFO
      SIF.fMask = SIF_PAGE
      SIF.nPage = 0
      SendMessage(Scrollbar1,SBM_SETSCROLLINFO,True,CInt(@SIF))
 SendMessage(Scrollbar1, SBM_SETPOS, Cast(WPARAM,100), 0)



 Scrollbar2 = CreateWindowEx(0,"ScrollBar","Scrollbar2",WS_CHILD OR WS_VISIBLE OR WS_CLIPSIBLINGS OR SBS_VERT, _
                         592,8,32,320,Form1,Cast(HMENU,103),GetmoduleHandle(0),NULL)

  SendMessage(Scrollbar2, SBM_SETRANGE,0,100)
       
      SIF.fMask = SIF_PAGE
      SIF.nPage = 1
      SendMessage(Scrollbar2,SBM_SETSCROLLINFO,True,CInt(@SIF))
 SendMessage(Scrollbar2, SBM_SETPOS, Cast(WPARAM,50), 0)


 ShowWindow(Form1,SW_SHOW)
 UpdateWindow(Form1)
END SUB

'***************************************************************
' Now that the form and its controls are loaded and on the
' screen, we go into the event loop and wait for the user
' to do something!
'***************************************************************

FUNCTION Form1_Proc ( byval hWnd as HWND, byval Msg as UINT, byval wParam as WPARAM, byval lParam as LPARAM ) as LRESULT
 Dim RetC AS RECT
 Dim pToolTip AS TOOLTIPTEXT PTR
 Dim ptnmhdr AS NMHDR PTR         'information about a notification message
 Dim pRebar AS NMREBAR PTR
 Dim mminfo AS MINMAXINFO PTR
 
 
 SELECT CASE Msg

    CASE WM_CREATE
      EXIT FUNCTION
    CASE WM_CTLCOLORSTATIC, WM_CTLCOLORBTN, WM_CTLCOLOREDIT,WM_CTLCOLORLISTBOX, WM_CTLCOLORSCROLLBAR
           If Cast(HWND,lparam)=Scrollbar1 Then
             SetTextColor(Cast(HDC,wParam),BGR(0,0,0))
             SetBkColor(Cast(HDC,wParam), BGR(255,255,255))
             Return cast(LRESULT,createsolidbrush(BGR(255,255,255)))
           End If
           If Cast(HWND,lparam)=Scrollbar2 Then
             SetTextColor(Cast(HDC,wParam),BGR(0,0,0))
             SetBkColor(Cast(HDC,wParam), BGR(255,255,255))
             Return cast(LRESULT,createsolidbrush(BGR(255,255,255)))
           End If
   CASE WM_SIZE
   IF  wparam  <>  SIZE_MINIMIZED THEN
   END IF
          return 0



  CASE WM_COMMAND
  SELECT CASE LOWORD(wParam)   
    Case else
  END SELECT
  Return 0
 
  CASE WM_CLOSE
 
 if IDYES = MessageBox(hWnd,"Quit?","Form1", MB_YESNO or MB_ICONQUESTION) Then
    DestroyWindow(Form1)
 end If
    Return 0
 
  CASE WM_DESTROY
     PostQuitMessage(0)
     Return 0
 
 END SELECT
   Return DefWindowProc( hWnd, Msg, wParam, lParam )
END FUNCTION
Last edited by counting_pine on Jun 16, 2014 0:13, edited 1 time in total.
Reason: Use [code]...[/code] block
aloberoger
Posts: 495
Joined: Jan 13, 2009 19:23

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

Postby aloberoger » Jun 15, 2014 14:25

Code: Select all

//edit:

I've built a slightly modified version of the compiler, that may fix the problem: Please download from http://users.freebasic-portal.de/stw/files/tmp/fbc_mingw_custom01.zip and try whether that build fixes the problem.
Please still provide the information requested above in addition.



this build is correct once I can Compile my project now
can one have an idea on what would 't have gone early?.
St_W
Posts: 1504
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Jun 15, 2014 16:03

aloberoger wrote:I notice that somebody else don't have this pb , firt can you compile this simple example please.

That example compiles without any problems here. I just tested it with fbc 0.24 and fbc 0.91 git build #95. Note that the git build does not include win32-headers, i copied them from another compiler package.

I used the following command to compile: fbc -s gui a.bas
(I saved the code as "a.bas")

aloberoger wrote:this build is correct once I can Compile my project now
can one have an idea on what would 't have gone early?.

The only change included in this build is an additional lower-case conversion for the subsystem parameter ( -s ... ).
Therefore, I'm pretty sure now, that you are actually passing "-s Gui" somewhere, using an upper-case "G".
This is a problem with your build configuration or project setup and not related to my fbc builds or fbc/ld in general.

Please double check your project setup for such a wrong subsystem specification (it has to be "-s gui" in lowercase letters) !
You could use a dummy executable "fbc.exe" that displays the parameters for debugging the cause:

Code: Select all

PRINT "fbc parameters:"
PRINT COMMAND
Compile this code, save it as "fbc.exe" and put it in place of the original "fbc.exe". Then try to compile your project (such one, that caused problems) again and look at the console output. The parameters must not contain "-s Gui" or anything similar using uppercase letters. As soon as you've found and corrected the wrong parameter restore the original "fbc.exe".
aloberoger
Posts: 495
Joined: Jan 13, 2009 19:23

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

Postby aloberoger » Jun 15, 2014 17:21

older version work normally I speak about your last version fbc_win32_mingw

fbc_mingw_custom01 is not good at all
infortunetelly there are many insufficiencies in this grinding of fbc, here is one; there are still others notament untraceable point entrance in msvctr.dll



C:\fbc_win32_mingw\lib\win32/libGuitk2013.a(guitk2013.o):fake:(.text+0x67fe): undefined reference to `$fb_Object::$fb_Object()'
C:\fbc_win32_mingw\bin\win32\ld.exe: C:\fbc_win32_mingw\lib\win32/libGuitk2013.a(guitk2013.o): bad reloc address 0xb8 in section `.data'
C:\fbc_win32_mingw\bin\win32\ld.exe: final link failed: Invalid operation
Last edited by aloberoger on Jul 01, 2014 13:01, edited 1 time in total.
St_W
Posts: 1504
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Jun 15, 2014 18:14

OK, but this is not related to your original error message at all!
aloberoger wrote:strange error while compiling some projects:
C:\fbc_win32_mingw\bin\win32\ld.exe: invalid subsystem type Gui

__________________

I am very sorry to tell you, but your error reports are not very useful if you don't provide enough information and don't use correct english to describe the problems. For example:
  • Provide context information, not just the error messages. What were you trying to do? What is the program supposed to do?
  • It is fine that you give information about the exact error messages, but you didn't include any information about the source code and the build command. There are huge differences e.g. when you use "-gen gcc" instead of "-gen gas", etc.
  • Provide everything that is needed to make your errors reproducible.
  • Give additional information about the intent of the code, expected behaviour, expected results.
  • "fbc_win32_mingw" does not identify a compiler version. It just tells us the system architecture and toolsuite. Include more specific information like version number, build date and build number.
  • Try to avoid spelling mistakes and other errors to increase readability of your answers
These are just some suggestions. Of course, one cannot provide all that information in some situations, e.g. the source code often cannot be released.

I am sorry for directly telling you my thoughts, that may sound a little bit harsh, but I am just disappointed as I'm trying to help and your replies give a very unspecific description of the problem and leave most of my questions unanswered.
speedfixer
Posts: 413
Joined: Nov 28, 2012 1:27
Location: California

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

Postby speedfixer » Jun 16, 2014 0:25

Lubuntu 64bit 13.10
My environment and all is good.
I was using the current 32 bit FB - 0.90.1 - no troubles. I don't have any problems hunting down missing correct libraries, etc.

I would like to begin using the current build-before-release that stw is offering.
All that is present in his file is the fbc executable, change log, readme, and install.sh.

I move fbc to replace the fbc in /usr/local/bin.

While fbc will execute and give me the version:

Code: Select all

david@3800LU64:/rdkl/build/testlib$ fbc -version
FreeBASIC Compiler - Version 0.91.0 (06-13-2014), built for linux (32bit)
Copyright (C) 2004-2014 The FreeBASIC development team.


any compile attempt says the balance of the fbc system can't be found:

Code: Select all

david@3800LU64:/rdkl/build/testlib$ fbc pp.bas
ld: cannot find /usr/local/bin/../lib/freebasic/linux/fbextra.x: No such file or directory
ld: cannot find /usr/local/bin/../lib/freebasic/linux/fbrt0.o: No such file or directory
ld: cannot find -lfbgfx



Nothing in my system is changed but replacing new fbc with the old fbc.
Should there be more files to go with the new executable?
Where is this executable looking for the extra files - not /usr/local/lib/freebasic/ where they have always been located?

What am I missing?

With the number of changes since the last version, I would expect only a full install would have all the changes.
The .zip for the win32 version is 16m
The .zip for Linux 32 is 420k

I think Linux is the best ... but it isn't that good.

help?

david
TJF
Posts: 3600
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

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

Postby TJF » Jun 16, 2014 7:49

Usually there's no linux folder in /usr/local/lib/freebasic

speedfixer wrote:

Code: Select all

david@3800LU64:/rdkl/build/testlib$ fbc pp.bas
ld: cannot find /usr/local/bin/../lib/freebasic/linux/fbextra.x: No such file or directory
ld: cannot find /usr/local/bin/../lib/freebasic/linux/fbrt0.o: No such file or directory
ld: cannot find -lfbgfx


should contain

Code: Select all

/usr/local/bin/../lib/freebasic/fbextra.x
/usr/local/bin/../lib/freebasic/fbrt0.o

You may create the folder and copy the context?
St_W
Posts: 1504
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Jun 16, 2014 8:54

@david: I am sorry, the files are obviously missing. I wonder how how I could miss that (and I got no complaints until now).

The problem is that the library files are built in /lib/freebasic/linux, but only the /lib/freebasic folder is included in the package, which has no files in it (excluding subfolders). I will look into it.

//update 1:
@TJF: the path is correct. There has been a change in the FBC makefile.

The old version (0.90.1) defined libpath as follows:

Code: Select all

libdir      := lib/$(TARGET_PREFIX)$(FB_NAME)$(ENABLE_SUFFIX)

While the git version (0.91) defines libpath as follows:

Code: Select all

libdir         := lib/$(FBNAME)/$(libsubdir)

(both are only true for non-Standalone builds)
St_W
Posts: 1504
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Jun 16, 2014 12:33

I have fixed the issue to include the lib/freebasic/linux directory and triggered build and publishing jobs. Please find the builds in:
x86: http://users.freebasic-portal.de/stw/bu ... -06-16.zip
x86_64: http://users.freebasic-portal.de/stw/bu ... -06-16.zip

Unfortunately I currently do not have set up any test jobs for Linux and DOS builds. Thus the build is untested. [but of course it should work ;-) ]

The build does not include the Headers that are normally provided in the "inc" directory to keep the package size small. Please tell me if this directory (and subdirectories?) should be included in the package too.

regarding the size difference to the win32 package: the win32 package and also the win64 package do contain tools from the mingw toolsuite (e.g. linker, assembler, resource compiler, C compiler) , their libraries (e.g. libgcc) some headers (e.g. gfx, file, ...) and some win32 import libs (e.g. libkernel32). The linux builds do not contain all this stuff; furthermore the compiled executable is just smaller.
speedfixer
Posts: 413
Joined: Nov 28, 2012 1:27
Location: California

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

Postby speedfixer » Jun 16, 2014 15:35

Thank you so much.

David
dodicat
Posts: 6687
Joined: Jan 10, 2006 20:30
Location: Scotland

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

Postby dodicat » Jul 01, 2014 11:37

What exactly is the difference between version 0.91 and version 0.91_x86?
Who should use what?
This code snippet is certainly different for each of the two versions, result-wise.

Code: Select all




dim as integer mx,my
dim as uinteger colour
screenres 640,480,32
do
    getmouse(mx,my)
    screenlock
    cls
colour=.999999*Point(mx,my)

    line(5,5)-(400,400),colour,bf
   
    draw string(30,30),"Color = " &colour,rgb(0,0,200)
screenunlock
sleep 1,1
loop until len(inkey)

sleep


 
MOD
Posts: 555
Joined: Jun 11, 2009 20:15

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

Postby MOD » Jul 01, 2014 12:13

Is this question related to my builds? If yes or in general:

The old "0.91" builds are x86 builds. These builds contain a 32bit fbc. So "0.91" and "0.91_x86" are the same in this part. However, "0.91_x86" is the new naming schema as we have a "0.91_x86_64" (also called "0.91_x64") build now, which contains a 64bit fbc.

The differences between "0.91" and "0.91_x86" comes from the different date. These are builds from the git repository to a certain date. Use "fbc -version" to see the difference in date (and so in the code version).

Also, don't use my builds, I'm not updating anymore! St_Ws builds are generated after each commit, use these...
dodicat
Posts: 6687
Joined: Jan 10, 2006 20:30
Location: Scotland

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

Postby dodicat » Jul 01, 2014 13:38

Thanks MOD.

I am using your builds.
St_w's ~~ I thought was Linux.

quote:
Where can I get a Recent-GitBuild of FreeBASIC?

Sorry to hear that you are not updating.

Your 0.91_x86 can handle byval as string (parameter)
Your 0.91 cannot.
But your 0.91_x86 gets the colours wrong (in my previous post).
Maybe I should update my box, still using XP 32 bit.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest