CVS build broken for GCC/Make

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Ryz
Posts: 0
Joined: Mon Jan 16, 2006 4:31 am

CVS build broken for GCC/Make

Post by Ryz »

The current make dies on the compiling of makesdna.c, as it refers to guardedalloc/mallocn.a, which now seems to have an unreferenced function _nunmap

After being pointed out on IRC that there was a thread on a new memory management change as reported on bf-commit, I thought someone with CVS access might want to know...

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Post by jms »

same problem with scons and msvc 7.1 :
Linking library ==> 'blender_img.lib'
Compiling ==> 'makesdna.c'
makesdna.c
Linking program ==> 'makesdna.exe'
bf_guardedalloc.lib(mallocn.obj) : error LNK2019: unresolved external symbol _mu
nmap referenced in function _rem_memblock
E:\bf-blender\build\win32-vc\makesdna.exe : fatal error LNK1120: 1 unresolved ex
ternals
scons: *** [E:\bf-blender\build\win32-vc\makesdna.exe] Error 1120
scons: building terminated because of errors.
E:\bf-blender\blender>
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

lox_federico
Posts: 0
Joined: Mon Jan 23, 2006 1:41 pm
Location: Rome, Italy
Contact:

Post by lox_federico »

Problem is in mallocn.c, on lin 44 You can find:

Code: Select all

#if defined(AMIGA) || defined(__BeOS) || defined(WIN32)
#else
#include <sys/types.h>
#include <sys/mman.h>
#endif
No mman.h for Windows (win32 platform misses mmap and munmap) so munmap symbol missing (_munmap in libguardedalloc.a).
Federico "Lox" Lucignano
--------------------------------------------

Author of:
http://www.infosquid.net - InfoSquid: IT abyss

Contributor on:
http://www.blendernation.com - BlenderNation: fresh Blender news, every day

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

Quick fix for now, until a proper solution has been implemented:

http://projects.blender.org/pipermail/b ... 13619.html

/Nathan

Ryz
Posts: 0
Joined: Mon Jan 16, 2006 4:31 am

Post by Ryz »

Thanks all. I had tried to use the mmap/munmap/sbrc etc. equivalent code listed for Windows, but couldn't get it to work with the CRITICAL_SECTION part that was listed... Someone with more than rudimentary C/C++ knowledge (like I have) should have a look at that...

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

Erwin committed a temporal fix to this file, so perhaps you can compile now.

/Nathan

Ryz
Posts: 0
Joined: Mon Jan 16, 2006 4:31 am

Post by Ryz »

jesterKing wrote:Erwin committed a temporal fix to this file, so perhaps you can compile now.

/Nathan
Yeah, I read that follow-up :)

Make is running now...

[Edit: and finished fine]
Last edited by Ryz on Fri Feb 17, 2006 10:38 pm, edited 1 time in total.

lox_federico
Posts: 0
Joined: Mon Jan 23, 2006 1:41 pm
Location: Rome, Italy
Contact:

Post by lox_federico »

Just posted in the patch tracker:

here's an implementation of mmap & munmap for the win32 platform.

By including it in mallocn.c at line 44 I succeded in compiling blender.

Hope it can be of any help :wink:

mmap & munmap implementation for win32 by Lox
Federico "Lox" Lucignano
--------------------------------------------

Author of:
http://www.infosquid.net - InfoSquid: IT abyss

Contributor on:
http://www.blendernation.com - BlenderNation: fresh Blender news, every day

Ryz
Posts: 0
Joined: Mon Jan 16, 2006 4:31 am

Post by Ryz »

lox_federico wrote:Just posted in the patch tracker:

here's an implementation of mmap & munmap for the win32 platform.

By including it in mallocn.c at line 44 I succeded in compiling blender.

Hope it can be of any help :wink:

mmap & munmap implementation for win32 by Lox
Nice! Hope it shows up soon in the CVS too... :)

Post Reply