August 23, 2019, 06:13:02 PM

Author Topic: bah.mod compile errors  (Read 2811 times)

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
bah.mod compile errors
« on: September 07, 2017, 10:58:18 AM »
I downloaded bah.mod and extracted it to the 'mod' folder of BlitzMax,

I get compile error one Windows :
Quote
[  6%] Compiling:CEGUIRenderedString.cpp
In file included from C:/BlitzMax/mod/bah.mod/cegui.mod/cegui/src/CEGUIPCRERegexMatcher.cpp:28:0:
C:/BlitzMax/mod/bah.mod/cegui.mod/cegui/include/CEGUIPCRERegexMatcher.h:33:18: fatal error: pcre.h: No such file or directory
compilation terminated.
Build Error: failed to compile (1) C:/BlitzMax/mod/bah.mod/cegui.mod/cegui/src/CEGUIPCRERegexMatcher.cpp
A different error on Mac OS :
Quote
[  2%] Compiling:b2Settings.cpp
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/libs/thread/src/pthread/once.cpp:8:
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/libs/thread/src/pthread/./once_atomic.cpp:9:
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/boost/thread/once.hpp:20:
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/boost/thread/pthread/once_atomic.hpp:20:
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/boost/atomic.hpp:12:
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/boost/atomic/atomic.hpp:17:
In file included from /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/boost/atomic/detail/platform.hpp:22:
/Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/boost/atomic/detail/gcc-atomic.hpp:932:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const boost::atomics::detail::storage128_type &' for 1st argument
struct BOOST_ALIGNMENT(16) storage128_type
Build Error: failed to compile (256) /Applications/BlitzMaxNG/mod/bah.mod/boost.mod/src/libs/thread/src/pthread/once.cpp

Please help and forgive my BlitzMax ignorance!
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline Henri

  • Full Member
  • ***
  • Posts: 207
Re: bah.mod compile errors
« Reply #1 on: September 08, 2017, 07:18:14 AM »
Hi,

I can look at this on weekend. Did other modules build fine ?  Do you require CEGUI specifically ?

-Henri

Ps. I don't have a Mac so can only test in Windows. You can also post 'issues' in Brucey's site in https://github.com/bmx-ng or https://github.com/maxmods
- Got 01100011 problems, but the bit ain't 00000001

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: bah.mod compile errors
« Reply #2 on: September 08, 2017, 01:48:48 PM »
Thanks Henri.

Quote
Did other modules build fine ? Do you require CEGUI specifically ?
It stops at 6% on Windows or %2 on Mac and to know if other modules build fine I tried to remove cegui.mod folder and try to build again but more errors are generated regarding exapt.mod stating missing files expat_config.h, xmlparse.c, deleted that mod folder and rebuild again and more errors are generated....I get tired!!!

And no I do not require CEGUI!
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 397
Re: bah.mod compile errors
« Reply #3 on: September 08, 2017, 03:00:44 PM »
Hello sphinx,

this post should be in Brucey's Modules board but anyway.

Okay, so Bah.mod is full of lots of modules that most people never need so you should delete everything you don't actually need. Some have dependencies which you can find from looking at the source. I made a list once which I'll repost below.

Having used Boost in one of my projects I am aware that you don't need to build the module you import the source headers to your project so the bits of Boost used in your project can be built. However it should build as a module and very fast, it looks like your error would be fixed with the -w overload warnings option. You always should have this option on in NG.

The other error "pcre.h: No such file or directory" means you need libpcre installed (Perl) due tp "CC_OPTS: -DPCRE_STATIC -DSUPPORT_PCRE16" (probably the latest of pcre v1).

Also, what I like to do with Bah.mod is install Subversion and then download just one module at a time with the command-line. Copy the module url and rename the tree/master bit to trunk and be sure to "cd" to the folder you want the module in:
Code: [Select]
svn checkout https://github.com/maxmods/bah.mod/trunk/cegui.mod
The list is in the form: Import dependency > Module importing
Quote
base64 > dbgp
bass > Bass_FX
bass > GMEBass
bass > SidBASS
bass > TheoraPlayerBASS
boost > BoostLocale
boost > FileSystemEX
boost > Interprocess
boost > Libtorrent
boost > Rational
boostlocale > DateTime
bigint > Barcode
cegui > CEGUIDirect3D9
cegui > CEGUIOpenGL
crypto > Libtorrent
database > DBMySQL
database > DBODBC
database > DBOracle
database > DBPostgreSQL
database > DBSQLite
database > DBXbase
expat > GDAL
expat > Graphviz
freeimage > CEGUI
fmod > FMODAudio
fmod > RaknetVoiceFMOD
gme > GMEBass
gme > GMEOpenAL
graphviz > GraphvizMax2D
gtkmaxgui > GTKWebGTKHTML
gtkmaxgui > GTKWebMozilla
gtkmaxgui > GTKWebKitGtk
gtkmaxgui > MaxGUITextAreaScintilla
irrklang > irrKlangAudio
leptonica > Tesseract
libiconv > Barcode
libiconv > BoostLocale
libiconv > LibArchive
libcurl > GDAL
libcurl > Raptor
libssh2 > libcurlSSL
libxml > LibArchive
libxml > Libxslt
libxml > Locale
libxml > Magick
libxml > Persistence
libxml > XLWriter
libxslt > Raptor
oggvorbis > TheoraPlayer
osmesa > OSMesaGraphics
osmesagraphics > OSMesaMax2D
osmesagraphicsbase > OSMesaGraphics
osmesagraphicsbase > OSMesaMax2DBase
osmesamax2dbase > OSMesaMax2D
raknet > RaknetRooms
raknet > RaknetVoice
raknetvoice > RaknetVoiceFMOD
raptor > Flickcurl
regex > CEGUI
regex > Format
regex > FTPParser
regex > Serial
regex > XLWriter
sid > SidBASS
sstream > LibArchive
sstream > RamSStream
sstream > TextSStream
streamhtmlparser > ClearSilver
theoraplayer > TheoraPlayerBASS
xz > LibArchive

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: bah.mod compile errors
« Reply #4 on: September 08, 2017, 04:19:29 PM »
Thanks markcwm

I did post on Brucy's board but I thought it's a BlitzMax/NG forum here anyway :)
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline Henri

  • Full Member
  • ***
  • Posts: 207
Re: bah.mod compile errors
« Reply #5 on: September 09, 2017, 11:14:06 AM »
Okay,

after the dust settled, here is a list of modules that don't compile out of the box:

{list}
{li}gdal.mod{/li}
{li}graphviz.mod{/li}
{li}graphvizmax2d.mod{/li}
{li}libcurlssl.mod{/li}
{li}libssh2.mod{/li}
{li}libtcod.mod{/li}
{li}libtorrent.mod{/li}
{li}libusb.mod{/li}
{li}libxslt.mod{/li}
{li}magick.mod{/li}
{li}opencl.mod{/li}
{li}raknet.mod{/li}
{li}raknetrooms.mod{/li}
{li}raknetvoice.mod{/li}
{li}raknetvoicefmod.mod{/li}
{li}ramsstream.mod{/li}
{li}sid.mod{/li}
{li}sidbass.mod{/li}
{li}speech.mod{/li}
{li}sstream.mod{/li}
{li}tesseract.mod{/li}
{li}textsstream.mod{/li}
{li}tmx.mod{/li}
{li}xlwriter.mod{/li}
{/list}

Some of them are easily fixed like libusb.mod by renaming variable interface to something else (interface is a keyword, and can't be used as a variable name), and some have dependencies with each other, so by fixing one, you fix others too. Some might need external framework to be installed first (this should be mentioned in the source). Others require deeper level of searching in order to be fixed.

If there is a specific module you need, then best bet is to raise an issue in github, and second best is to mention it here.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: bah.mod compile errors
« Reply #6 on: September 09, 2017, 11:44:38 AM »
As a Blitzmax NG and bah.mod user, here's a tip: you don't build the whole mod collection at the same time unless you're going to use them all at once in your project, which would be highly unlikely.

I have used bah.mod and have picked only the ones that I use. I'm sure you're going to sort out those errors one by one. Also, some mods might not be NG compatible (yet) so you will encounter some issues.

I'm guessing it took you some time to download or clone the repo because that is a HUGE collection of mods.  ;D

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: bah.mod compile errors
« Reply #7 on: September 09, 2017, 02:25:27 PM »
Okay,

after the dust settled, here is a list of modules that don't compile out of the box:

{list}
{li}gdal.mod{/li}
{li}graphviz.mod{/li}
{li}graphvizmax2d.mod{/li}
{li}libcurlssl.mod{/li}
{li}libssh2.mod{/li}
{li}libtcod.mod{/li}
{li}libtorrent.mod{/li}
{li}libusb.mod{/li}
{li}libxslt.mod{/li}
{li}magick.mod{/li}
{li}opencl.mod{/li}
{li}raknet.mod{/li}
{li}raknetrooms.mod{/li}
{li}raknetvoice.mod{/li}
{li}raknetvoicefmod.mod{/li}
{li}ramsstream.mod{/li}
{li}sid.mod{/li}
{li}sidbass.mod{/li}
{li}speech.mod{/li}
{li}sstream.mod{/li}
{li}tesseract.mod{/li}
{li}textsstream.mod{/li}
{li}tmx.mod{/li}
{li}xlwriter.mod{/li}
{/list}

Some of them are easily fixed like libusb.mod by renaming variable interface to something else (interface is a keyword, and can't be used as a variable name), and some have dependencies with each other, so by fixing one, you fix others too. Some might need external framework to be installed first (this should be mentioned in the source). Others require deeper level of searching in order to be fixed.

If there is a specific module you need, then best bet is to raise an issue in github, and second best is to mention it here.

-Henri

Many thanks Henri for taking the time to clear this up.
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline sphinx

  • Full Member
  • ***
  • Posts: 207
    • Ancientsoft
Re: bah.mod compile errors
« Reply #8 on: September 09, 2017, 02:27:16 PM »
As a Blitzmax NG and bah.mod user, here's a tip: you don't build the whole mod collection at the same time unless you're going to use them all at once in your project, which would be highly unlikely.

I have used bah.mod and have picked only the ones that I use. I'm sure you're going to sort out those errors one by one. Also, some mods might not be NG compatible (yet) so you will encounter some issues.

I'm guessing it took you some time to download or clone the repo because that is a HUGE collection of mods.  ;D

You are right but as I consider myself BlitzMax newbie after long time of leaving it, I thought all will work good and out of the box :)
Kind regards,
Maher F. Farag
www.ancientsoft.com
www.osakit.com

Offline RonTek

  • Sr. Member
  • ****
  • Posts: 357
Re: bah.mod compile errors
« Reply #9 on: September 11, 2017, 10:51:32 AM »
As a Blitzmax NG and bah.mod user, here's a tip: you don't build the whole mod collection at the same time unless you're going to use them all at once in your project, which would be highly unlikely.

I have used bah.mod and have picked only the ones that I use. I'm sure you're going to sort out those errors one by one. Also, some mods might not be NG compatible (yet) so you will encounter some issues.

I'm guessing it took you some time to download or clone the repo because that is a HUGE collection of mods.  ;D

You are right but as I consider myself BlitzMax newbie after long time of leaving it, I thought all will work good and out of the box :)

I see and that is understandable. Yes, it depends on the mod package. As you can tell, Brucey's mods are more of a collection compared to others out there.  :)

Offline meems

  • Sr. Member
  • ****
  • Posts: 310
Re: bah.mod compile errors
« Reply #10 on: February 24, 2018, 09:04:46 AM »
get
Quote
Linking:untitled4.debug.mt.exe
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x1f6): undefined reference to `bmx_map_intmap_clear'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x250): undefined reference to `bmx_map_intmap_isempty'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x2b9): undefined reference to `bmx_map_intmap_insert'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x31c): undefined reference to `bmx_map_intmap_contains'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x37c): undefined reference to `bmx_map_intmap_valueforkey'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x3dc): undefined reference to `bmx_map_intmap_remove'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x73a): undefined reference to `bmx_map_intmap_copy'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x8aa): undefined reference to `bmx_map_intmap_key'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x900): undefined reference to `bmx_map_intmap_value'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0x96a): undefined reference to `bmx_map_intmap_hasnext'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0xa10): undefined reference to `bmx_map_intmap_firstnode'
C:/BlitzMax/tmp/.bmx/untitled4.bmx.gui.debug.mt.win32.x86.o:(code+0xa63): undefined reference to `bmx_map_intmap_nextnode'
Build Error: Failed to link C:/BlitzMax/tmp/untitled4.debug.mt.exe
when i try to compile intmap.
I've red the posts above this and the '-w' flag at compile is meant to be the 1st cure to try. I guess this is not an option in the standard bmax ide? Odd that Mark was trying to make bmax highly customizable, yet any small mod needs not just work outside the ide by the dev but also by the end user.

if you're expecting users to try compile bmax code outside the ide, some info in working bmax at the commandline would be useful. I had a look in the bmax bin directory 'bcc' 'bmk' 'FACM' 'ar' , and tried running these with the code filepath as a parameter. nothing worked, 'ar' at least seemed to parse the code, but threw strange errors on code that works in the ide.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: bah.mod compile errors
« Reply #11 on: February 24, 2018, 09:48:15 AM »
As written in my other post:

- before replacing brl.mod/pub.mod with the ones of maxmod: fetch bmk-ng
https://github.com/bmx-ng/bmk

- compile bmk (best as "threaded" for faster compilation) and copy the binary as bmk.exe (not bmk.mt.exe) to blitzmax\bin (check that github page - you will need to copy 2 .bmk files too)

- check if you can still compile your normal stuff...

- download and install a "compatible" MinGW (4.6 and 4.7 are working for certain stuff, Brucey often uses way newer ones - but some rare modules do not work well with all MinGWs ... brl.mod and pub.mod are the most tested ones, so they should work with 5.x and 6.x too). Installation means: blitzmax\MinGW32 - or you need to make sure paths are set correctly, so bmk is able to find it

- check if you can recompile (vanilla blitzmax came with precompiled modules - so you did not need MinGW but rebuilding needs MinGW) modules

- if you can recompile succesfully, and are able to compile some sample file, update brl.mod and pub.mod from github.com/maxmods (just rename brl.mod to brl.mod_old and do the same for pub.mod - so they are still there as backup but are no longer used)

- module compilation should be now done on a "as needed" base (bmk-ng handles this)


From this moment on you just need to update brl.mod and pub.mod from the maxmods-repo and it should do everything automatically. Initial steps are the biggest to climb.


bye
Ron