Ooops
March 05, 2021, 08:03:24 PM

Author Topic: Rebuilding NG  (Read 173 times)

Offline _PJ_

Rebuilding NG
« on: February 14, 2021, 01:35:30 AM »
After breaking the BCC.exe, I have tried to use the last known 'good' BCC.exe
However, any compilation forces a rebuild all modules.

I am unsure why this time around, though, I am receiving a number of errors.

Firstly in "common.bmx" there was a call to MemAlloc() which was missing a parameter, so I replaced this wityh MemAlloc(length)
Next,
BAH.mod "registry.bmx" contained a number of occurrences of "Enum" being used as an object instance name. This was confused by the compiler to be Enum keyword, so I replaced these occurrences with "Enumr"
BAH.mod "stringbuilder.bmx" Same issue with "Enum"


The next issue, though was in BAH.mod/SStream

Code: [Select]
SuperStrict

Rem
bbdoc: Streams with large file support
End Rem
Module BaH.SStream

ModuleInfo "Version: 1.00"
ModuleInfo "Author: Mark Sibly"
ModuleInfo "License: zlib/libpng"
ModuleInfo "Copyright: Blitz Research Ltd"

ModuleInfo "History: 1.00 Release"
ModuleInfo "History: Initial port from BRL.Stream 1.09"


ModuleInfo "CC_OPTS: -D_FILE_OFFSET_BITS=64"

?bmxng
Import "common_ng.bmx"
?Not bmxng
Import "common.bmx"
?
Import "glue.c"

Import Pub.StdC

"common_ng.bmx" cannot be found.
Indeed I've looked through the MOD folders, the SRC folders and all my backups and sources from NG downloads etc. butthere is absolutely no sign of any such BMX file named "common_ng.bmx"

What is even more puzzling to me, is that previously I had successfully run REBUILD ALL MODULES...

Offline Derron

Re: Rebuilding NG
« Reply #1 on: February 14, 2021, 06:50:25 AM »
if you recompile bcc, then you do not _need_ to rebuild all modules.

If you are unsure if it affected any module (a bugfix in bcc changing logic in the modules), then just clean the modules. BMK will then compile all the modules needed for your project compilation (or test compilation file) - saves a lot of time.
BMK does not offer a proper module clean (the existing one ... does not remove all required files).
Checkout my Pull Request
https://github.com/bmx-ng/bmk/pull/98
and compile my fork
https://github.com/GWRon/bmk/tree/feat_resetmodsparam
rename the newly compiled "bmk.exe" as "bmk_reset.exe" and copy it to the NG/bin folder ... this allows you to run it like this "bmk_reset resetmods brl" (or leave out the "brl" to clean all modules). It will remove all .bmx folder content and the precompilates.


bye
Ron

Offline _PJ_

Re: Rebuilding NG
« Reply #2 on: February 14, 2021, 12:45:21 PM »
if you recompile bcc, then you do not _need_ to rebuild all modules.
After trying to use the new BCC.exe nothing woudl compile, soi I reverted it back. at which point, the first attempt to compile anything initiated a rebuild of all the modules.


Quote
If you are unsure if it affected any module (a bugfix in bcc changing logic in the modules), then just clean the modules.
What do you mean 'clean the modules'. I haven't altered any module logic. Only superficial variable names to prevent compilation errrors.

The current issue is that the module is trying to import a file that does not exist. Where can I obtain common-ng.bmx file?

Offline _PJ_

Re: Rebuilding NG
« Reply #3 on: February 14, 2021, 01:29:39 PM »
Okay so I completely removed the bah.mod directory and will replace it later with a new version from the online repo.
unfortunately this computer security policy is not compatible with online features of Git so cannot sync directly
__

However, I still needed to complete the building of the 'standard' mods.

THis fails now in BRL.reflection

"C:/Program Files/BlitzMax/bin/bcc.exe"  -g x64 -m brl.reflection -v -h -d -s -w -p win32 -o "C:/Program Files/BlitzMax/mod/brl.mod/reflection.mod/.bmx/reflection.bmx.debug.win32.x64.s" "C:/Program Files/BlitzMax/mod/brl.mod/reflection.mod/reflection.bmx"
[  7%] Processing:vector.bmx
"C:/Program Files/BlitzMax/bin/bcc.exe"  -g x64 -m brl.vector -v -h -d -s -w -p win32 -o "C:/Program Files/BlitzMax/mod/brl.mod/vector.mod/.bmx/vector.bmx.debug.win32.x64.s" "C:/Program Files/BlitzMax/mod/brl.mod/vector.mod/vector.bmx"
Parsing...
Semanting...
Compile Error: Identifier 'objectisstring' not found.
[C:/Program Files/BlitzMax/mod/brl.mod/reflection.mod/reflection.bmx;3524;0]
Build Error: failed to compile (-1) C:/Program Files/BlitzMax/mod/brl.mod/reflection.mod/reflection.bmx
Process complete

Offline Derron

Re: Rebuilding NG
« Reply #4 on: February 14, 2021, 01:36:03 PM »
your brl.mod is also out of date


download the latest release from blitzmax.org  - and then just replace the bcc.exe with the one i provided (or compile your own from the bcc.git-repository).


bye
Ron

Offline _PJ_

Re: Rebuilding NG
« Reply #5 on: February 14, 2021, 01:55:14 PM »
your brl.mod is also out of date


download the latest release from blitzmax.org  - and then just replace the bcc.exe with the one i provided (or compile your own from the bcc.git-repository).


bye
Ron

Thanks for all your help, Ron. I apologise if my lack of clarity and familiarity with a lot of this process is frustrating for you, but believe me, it's incredibly so for me. I am comfortable with the "writing code" aspects, but the infrastructure/environment side, whilst clearly important is just outside my real area of experience and with strange terminologies and procedures is a little daunting to the uninitiated.

I do fully appreciate all the time and efforts you've put in, though. It has helped a great deal, even if I am a little slow in getting to grips with some of this!

Offline Derron

Re: Rebuilding NG
« Reply #6 on: February 14, 2021, 03:14:21 PM »
Don't worry much there - the only thing important here in this particular case is to know how you put together your "working" NG folder.
It seems to be a mix of updated and non-updated stuff - and this might lead to the issues.

especially "bcc" and "brl.mod" have sometimes a hen-egg dependence when updates of them happen.

bye
Ron

Offline _PJ_

Re: Rebuilding NG
« Reply #7 on: February 14, 2021, 03:26:06 PM »
Quote
especially "bcc" and "brl.mod" have sometimes a hen-egg dependence when updates of them happen
Understood. Although I do not mess with existing modules, I had not updated anything for about a year and since it all still worked okay, felt it wasn't necessary to do so. However, now I can see how even changing the bcc can impact on that interdependency so it is still important that I keep the core 'parts' up-to-date.

I can report that all is good now::


Latest version downloaded from blitzmax.org.
*All non-standard mods removed entirely*
Replaced all the contents of all the (install directory) folders accordingly with the content from the downloaded archive package
Replaced bcc.exe with the 'fixed' version (( as well as copying the bcc folder contents from the fixed repo branch too ))

bmk.exe makemods -a -r pub

Was successful

bmk.exe makemods -a -r brl

Was successful

tested with a project that does not use any 3rd party mods and it did seek to compile the BRL mods again, but did so without error!
_____________________________________________________________

Phew!
Finally, panic over :)

Thank you so much for all your help!

______________________________________________________________


At a later date, I will re-add the bah modules and then only compile individually what is required. If there are issues with specific ones, then at least I'll know what's what!

Offline Derron

Re: Rebuilding NG
« Reply #8 on: February 14, 2021, 07:21:17 PM »
It might have recompiled brl.mod stuff as you did compile your project as "debug" build?

the bmk-command used "-r" which means "release" (it skips doing the "debug" build of the modules).



Glad it works now.


bye
Ron

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal