[cgma-dev] cgm-cubit on 32 bit machine

Iulian Grindeanu iulian at mcs.anl.gov
Fri Jul 1 11:44:20 CDT 2011



----- Original Message -----
> On 07/01/2011 11:29 AM, Iulian Grindeanu wrote:
> >
> > I think I understand now. We are using CubitFile.hpp from cgm/util
> > folder, to compile, but we link against libcubiti19.so ? So do we
> > need
> > CubitFile.cpp in util? Or the files from util are not used at all?
> >
> 
> When linking against Cubit, your code is using our copy of
> CubitFile.hpp and
> our copy of CubitFile.cpp is unused. Cubit was apparently built using
> different versions of those files. So the problem is that the
> CubitFile.hpp
> that we are using (our copy) doesn't match what was used to compile
> the
> CubitFile.o that is within libcubiti19.so.
> 
> - jason

Thanks Jason,
So when I add at the end of CubitFile.hpp

Index: CubitFile.hpp
===================================================================
--- CubitFile.hpp       (revision 5042)
+++ CubitFile.hpp       (working copy)
@@ -291,6 +291,7 @@
         UnsignedInt32 mintNumModels;
         SModelData* mpaModelData;
     } mModelBuff;
+    char buff[12];
 };

 } // namespace NCubitFile

it compiles and runs "fine". If I do only char[4], it crashes early, and when I do
char[8], it crashes more spectacularly, with a stack corruption.

...
ERROR: Attribute type -1 not recognized.
ERROR: Attribute type -1 not recognized.
ERROR: Attribute type -1 not recognized.
ERROR: Attribute type -1 not recognized.
ERROR: Attribute type -1 not recognized.

Constructed 1 Volume: 1
*** stack smashing detected ***: /home/iulian/source/CGM/itaps/.libs/lt-testgeom terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0x1f2390]
/lib/tls/i686/cmov/libc.so.6(+0xe233a)[0x1f233a]
/home/iulian/source/CGM/itaps/.libs/libiGeom.so.0(+0x3e1e4)[0x68e1e4]
/home/iulian/source/CGM/itaps/.libs/libiGeom.so.0(+0x3541a)[0x68541a]
/home/iulian/source/CGM/itaps/.libs/libiGeom.so.0(igeom_load_+0x221)[0x6745b3]
/home/iulian/source/CGM/itaps/.libs/lt-testgeom[0x804ae55]
/home/iulian/source/CGM/itaps/.libs/lt-testgeom[0x804a80d]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x126bd6]
/home/iulian/source/CGM/itaps/.libs/lt-testgeom[0x804a3d1]
======= Memory map: ========
00110000-00263000 r-xp 00000000 08:06 918987     /lib/tls/i686/cmov/libc-2.11.1.so
00263000-00264000 ---p 00153000 08:06 918987     /lib/tls/i686/cmov/libc-2.11.1.so
00264000-00266000 r--p 00153000 08:06 918987     /lib/tls/i686/cmov/libc-2.11.1.
...


What would be the best solution? (maybe I should just ifdef-it for 32 bits?)

Thanks,
Iulian


More information about the cgma-dev mailing list