fb 1.07 tests

General discussion for topics related to the FreeBASIC project or its community.
marpon
Posts: 342
Joined: Dec 28, 2012 13:31
Location: Paris - France

fb 1.07 tests

Post by marpon »

Hi coderJeff
first of all thank's a lot to let Freebasic development alive and very active.

I wanted to test the new features of the 1.07 version...

And was surprised by the size of the resulting exe comparing to 1.06 : (90ko comparing to 40ko)
I was thinking if i've used the -g flag, but not...
after investigation i've found the reason
need to put -strip to get a stripped exe as it was on the previous versions

For me i would say it is done on the wrong way, -nostrip as default ( without putting it)
it should be -strip as default as before

because if you use the same cmd line for previous versions and after 1.07 without -strip you will have an increase of double in size.
and worst if you use -strip in your cmd line the versions prior 1.07 you will have error because -strip is not understood ( as -nostrip)

I can understand for some experts, it is interresting to have the symbols but remember B of Basic is for Beginner
so better to let the -strip as default , and for experts to play with the command line and add the cmd they want,

it was previouly possible with -g Wl "-S" ld cmd line (and still valid for 1.07 version)
ld extract
-s
--strip-all
Omit all symbol information from the output file.
-S
--strip-debug
Omit debugger symbol information (but not all symbols) from the output file.
Josep Roca
Posts: 564
Joined: Sep 27, 2016 18:20
Location: Valencia, Spain

Re: fb 1.07 tests

Post by Josep Roca »

I also think that -strip should be the default.
marpon
Posts: 342
Joined: Dec 28, 2012 13:31
Location: Paris - France

Re: fb 1.07 tests

Post by marpon »

@José

in the mean time ( until the -strip default is not re-implemented) :

a good advise is to use -Wl "-s" as is cmd line option, where :

Code: Select all

-      is minus
W      is in upper case
l      is L in lower case (no easy to see)
       is space
"      is double quote
-      is minus
s      is S in lower case  (same)
"      is double quote
with that option your cmd line will be compatible (and -strip) for all fbc versions

hopping -strip default be soon re-implemented on the fbc 1.07 cooking version
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: fb 1.07 tests

Post by speedfixer »

My vote: -strip default

david
marcov
Posts: 3454
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: fb 1.07 tests

Post by marcov »

Debug info by default. strip can be always done afterwards on release.

Unstripping is hard :-)
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: fb 1.07 tests

Post by dodicat »

IMO
Have non striped as default.
User can strip his/her final .exe with a switch (-s) or something.
Please keep the strip switch lower case (For fbide, which is still the popular ide)
marpon
Posts: 342
Joined: Dec 28, 2012 13:31
Location: Paris - France

Re: fb 1.07 tests

Post by marpon »

For the ones who dont like -strip as default, let me try to explain what was the situation until some weeks

the executables were always stripped as default , if debug info was wanted -g was available or more other options using ld -Wl option...

somebody asked to get access to the local symbols without all the debug information, (probably not happy with the -g -Wl "-s" option)
that why that -strip / -nostrip was introduced on the 1.07 .
Why not, but was put -nostrip as default ( who choose ?) no problem...

I understood it exists a #define to create fbc with default -strip or -nostrip according that define, the fbc 1.07 i've got is -nostrip as default
i don't know what's the choice for the next release.

The situation if it will stay like that is not coherent with the existing versions until 1.06 (included), bigger exe for nothing in most cases.

that is why I'm asking to reconsidere the -strip as default for the next release to be coherent with the existing releases.

all the other needs :
-g still works
and -nostrip for the ones who want it
and again -Wl "..." for all the subtil options needed.

for me, because i noticed it, i will only change my cmd lines in my ide to get what i want, ...
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

Re: fb 1.07 tests

Post by speedfixer »

Very useful options - for debugging.
Certainly this makes for a simpler task when helping a beginner: you don't have to instruct them to recompile, recompile with different options.
But these options won't help most beginners: they just don't have that difficult a problem, not that complex type of code.

For more problems with more advanced code, the programmer should have a clue when he is entering an area that he is not familiar with. He should have a clue when a particular option should benefit him. And we expect he knows how the read the manual.

If we are 'selling' FB as a developers tool, then it makes sense to have any extra debug info present as a default.

That has not been the history of FB.
And I don't think anyone wants to advertise that FB is not small, not simple, not fast for anyone surveying whether or not to use FB for the first time.

For the advanced, they tend to use a nightly or post-release newer build. Not-ready-for-primetime releases. Might still be major bugs.
For these, fine: leave the debug options default on. An advanced user knows what he is getting and how to change compile time options.
Any link toward the non-stable release should have a note that default options are not the same.

For a final release - sourced from the FreeBASIC front web page - turn that stuff off. We aren't asking a new user to debug for us.
If someone feels he needs different options for a specific platform, then he is volunteering to be the release maintainer for the distribution, I suppose.
Again, that just hasn't been the history of FB.

If any of these options are left in by default, there should be a DEFAULT OPTIONS topic on the first index page of the wiki with clear indications of defaults along with 'typical' option sets that give faster or smaller resultant executables. It already takes a LOT of browsing in the manual or on the wiki to find things.

david
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: fb 1.07 tests

Post by MrSwiss »

bugfix github: #141 wrote:+- github #141: introduced '-strip'/'-nostrip' options to control symbol stripping of output files (William Breathitt Gray)
+- github #141: fbc will default to stripping symbols if '-d ENABLE_STRIPALL' is passed in FBCFLAGS (William Breathitt Gray)
+- github #141: makefile option 'ENABLE_STRIPALL=1' introduced to pass '-d ENABLE_STRIPALL' via FBCFLAGS by default for dos/win32 targets (William Breathitt Gray)
Therefore, it seems that only the passing of: ENABLE_STRIPALL=1 was omitted building 1.07.0 DEV.
I'm pretty certain that St_W could fix that quickly, for future builds (which restores "old" defaults).
marpon
Posts: 342
Joined: Dec 28, 2012 13:31
Location: Paris - France

Re: fb 1.07 tests

Post by marpon »

@ MrSwiss thank's for the precision

It works perfectly
I've built my onw fbc.exe with -d ENABLE_STANDALONE=1 -d ENABLE_STRIPALL=1
and -strip is the default now.


as a dev version it is not important...
St_W
Posts: 1618
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: fb 1.07 tests

Post by St_W »

MrSwiss wrote:Therefore, it seems that only the passing of: ENABLE_STRIPALL=1 was omitted building 1.07.0 DEV.
I'm pretty certain that St_W could fix that quickly, for future builds (which restores "old" defaults).
That's correct, I didn't add that setting, but I could easily. The question is what will be the default for the next official release? (like we have e.g. ENABLE_STANDALONE=1 as default for Windows builds). If the official release will be built with that setting I'll add it as well. Otherwise I'm not too sure whether it makes sense.
Are there any plans already whether or on which platforms to make ENABLE_STRIPALL=1 default?
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: fb 1.07 tests

Post by MrSwiss »

Since the above mentioned changes, have been committed to "master", we can
safely expect, that this won't change quickly, again. (Targets mentioned: DOS/WIN)
I suppose it is only relevant to the "standalone" builds ...
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: fb 1.07 tests

Post by srvaldez »

St_W wrote: Are there any plans already whether or on which platforms to make ENABLE_STRIPALL=1 default?
viewtopic.php?p=261458#p261458
coderJeff wrote: wiki is most up to date docs for current development version:
see Compiler Option: -strip
see Compiler Option: -nostrip

Correct, "--strip-all" linker option used to be called by default on all platforms. That recently changed:
See Implement control over symbol stripping #140

When building fbc for yourself there is a new "ENABLE_STRIPALL=1" build option to tell the makefile that fbc should be built with "-strip" as default or "-nostrip" otherwise.

What is supposed to happen, is that "ENABLE_STRIPALL=1" should be default on dos/win because we guessed that dos/win users would always be concerned with file size. Looks like the makefile logic isn't setting the value by default correctly.

You can explicitly enable the "-strip" option by default by building fbc with "ENABLE_STRIPALL=1"
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: fb 1.07 tests

Post by coderJeff »

I have changed logic in fbc's makefile so that "-strip" is the default build option for dos/win.

Works like this when building fbc from the makefile:
- 'make ENABLE_STRIPALL=1' forces default '-strip' on all targets
- 'make ENABLE_STRIPALL=0' forces default '-nostrip' on all targets
- 'make' where we haven't explicitly used ENABLE_STRIPALL=?, defaults to '-strip' on dos/win and '-nostrip' otherwise'

Note: if you are hacking on freebasic and building fbc from your own IDE, or using your own build makefile/script, then you must pass '-d ENABLE_STRIPALL' yourself to fbc to enable '-strip' by default, otherwise '-nostrip' is the default.

See makefile: use '-d ENABLE_STRIPALL' by default on dos/win32 builds #162

Added info to wiki page FB build configuration options
Provoni
Posts: 513
Joined: Jan 05, 2014 12:33
Location: Belgium

Re: fb 1.07 tests

Post by Provoni »

Thank you coderJeff and other people involved for FreeBASIC 1.07!
Post Reply