mpeaton / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

Memory demanding compilation for pyopencvext_free_functions.pypp.cpp #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It is not a defect but IMHO it would be great if some modifications could be 
made.

Compilation of pyopencvext_free_functions.pypp.cpp failed due to out of memory 
error. Error 
description is attached.

Tested on Linux and Mac OS X boxes. Both boxes have 2GB RAM and no other 
intensive 
processes. Managed to compile it by a naive solution of splitting the file into 
three.

"g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -
I/opt/local/include/opencv -I/Users/zhuj/Temp/boost_1_41_0 -Ipyopencv -
Ipyopencv/pyopencvext -Ipyopencv/pyopencvext/numpy_include  -
DBOOST_PYTHON_STATIC_LIB -DNDEBUG  -
I"/Library/Frameworks/Python.framework/Versions/5.1.0/include/python2.5" -
I"/Users/zhuj/Temp/boost_1_41_0" -c -o "bin/gcc-4.2.1/release/link-
static/pyopencv/pyopencvext/pyopencvext_free_functions.pypp.o" 
"pyopencv/pyopencvext/pyopencvext_free_functions.pypp.cpp"

cc1plus(633) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

cc1plus: out of memory allocating 4072 bytes after a total of 0 bytes

Original issue reported on code.google.com by zhu....@gmail.com on 10 Feb 2010 at 3:25

GoogleCodeExporter commented 9 years ago
That's strange because on my Ubuntu 9.10 on VirtualBox with only 256 MB of RAM, 
the
code can be compiled just fine. But I agree that the file is too large. I will 
find a
way to divide it into smaller pieces.

Original comment by pmtri80@gmail.com on 10 Feb 2010 at 9:07

GoogleCodeExporter commented 9 years ago
Then I think it may be related to the version of gcc I am using, which is 
4.2.1. Thanks for letting me know.

Original comment by zhu....@gmail.com on 10 Feb 2010 at 9:38

GoogleCodeExporter commented 9 years ago
FYI, I have splitted pyopencv_free_functions.pypp.cpp into multiple files since 
r799.
The change will be updated in the next release.

Cheers,
Minh-Tri

Original comment by pmtri80@gmail.com on 25 Apr 2010 at 8:57