commontk / dcmjs

dcmjs is a javascript cross-compile of dcmtk (dcmtk.org).
http://dcmjs.org
Other
109 stars 20 forks source link

compilation error on mac 10.8.5 #3

Closed arnaudgelas closed 10 years ago

arnaudgelas commented 10 years ago

Any idea what's wrong?

/Users/arnaud/GITROOT/dcmjs/build/DCMTK/ofstd/include/dcmtk/ofstd/ofstream.h:43:2: error: DCMTK needs stringstream or strstream type

error DCMTK needs stringstream or strstream type

^ /Users/arnaud/GITROOT/dcmjs/build/DCMTK/ofstd/include/dcmtk/ofstd/ofstream.h:118:23: error: no type named 'strstream' in namespace 'std' typedef STD_NAMESPACE strstream OFStringStream;


/Users/arnaud/GITROOT/dcmjs/build/DCMTK/ofstd/include/dcmtk/ofstd/ofstream.h:119:23: error: 
      no type named 'ostrstream' in namespace 'std'
typedef STD_NAMESPACE ostrstream OFOStringStream;
        ~~~~~~~~~~~~~ ^
/Users/arnaud/GITROOT/dcmjs/build/DCMTK/ofstd/include/dcmtk/ofstd/ofstream.h:120:23: error: 
      no type named 'istrstream' in namespace 'std'
typedef STD_NAMESPACE istrstream OFIStringStream;
        ~~~~~~~~~~~~~ ^
4 errors generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
jcfr commented 10 years ago

On Linux 13.04, I used emscripten master with the emscripten customized version of clang. On Mac, I am assuming you installed the SDK ?

What is the value of HAVE_SSTREAM and HAVE_STRSTREAM in /path/to/dcmjs-build//DCMTK-build/config/include/dcmtk/config/osconfig.h ?

In my case, both are defined. I would expect the same on your side.

In the the DCMTK-build folder, is there a TryRunResults.cmake file ?

arnaudgelas commented 10 years ago
 536 /* Define to 1 if you have the <sstream> header file. */
 537 /* #undef HAVE_SSTREAM */
 538 
 539 /* Define to 1 if you have the <sstream.h> header file. */
 540 /* #undef HAVE_SSTREAM_H */

[…]

 612 /* Define to 1 if you have the `strstr' function. */
 613 /* #undef HAVE_STRSTR */
 614 
 615 /* Define to 1 if you have the <strstream> header file. */
 616 /* #undef HAVE_STRSTREAM */
 617 
 618 /* Define to 1 if you have the <strstream.h> header file. */
 619 /* #undef HAVE_STRSTREAM_H */
 620 
 621 /* Define to 1 if you have the <strstrea.h> header file. */
 622 /* #undef HAVE_STRSTREA_H */
pieper commented 10 years ago

As a datapoint I could not replicate this on mac ox 10.9 with emscripten emsdk_portable 1.16.0 and cmake 2.8.12.1. Everything built cleanly.

jcfr commented 10 years ago

@arnaudgelas Could you try re-configuring the DCMTK project in DCMTK-build passing -DHAVE_STRSTREAM:BOOL=1 and -DHAVE_SSTREAM:BOOL=1 ?

If this work, will update External_DCMTK.cmake accordingly .. if not, considering it works on the latest macosx with the latest emscripten, I will mark it as won't fix.

arnaudgelas commented 10 years ago

@jcfr I have just reinstalled emscripten and pulled latest changes, it looks much better!! I still have some issues though, some related to #1 #4 and #6 I'll thus close this issue.