Closed GoogleCodeExporter closed 8 years ago
What gcc are you using?
Original comment by miller.lucas
on 16 Sep 2013 at 5:51
Good point. I am building in Xcode, which defaults to clang.
]clang -v
Apple LLVM version 5.0 (clang-500.0.60) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
From your question I imagine that if I switch the compiler to gcc that I should
be able to compile without issue. Survey says --- yes, it compiles and runs
properly.
]gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.0.60) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
For what it is worth, Apple has deprecated support for gcc, although it will
for sure be included with the system for a while still. The problem seems to be
the using declaration on shared_ptr within the Alembic::Util::v6 name space,
perhaps the using on the v6 namespace itself. That would seem to be a clang
issue. I'll see if I can work up a test case that demonstrates that, and if I
can, I'll file it with the clang people.
Original comment by Nick.Por...@gmail.com
on 16 Sep 2013 at 6:42
Ok, please let me know if it's a clang issue.
Original comment by miller.lucas
on 18 Sep 2013 at 12:45
Hi Miller,
Now that LLVM 5.0 is out, I retested. The issue is not resolved. A new issue is
that Xcode now reports that gcc is an unsupported compiler.
I had a little time to pursue the issue, and although I have not yet managed to
isolate a stand alone test case that demonstrates the issue for the clang
developers, I did find a workaround. I do still think it is a clang issue but
cannot prove it yet.
Here is a sample that fixes the problem for Ogawa's ArImpl. Similar patches fix
AwImpl, CprData, where the problem also crops up in a small number of cases.
What do you think the best way to proceed is? My recommendation is that I
continue to try to isolate the flaw so it can forwarded to the clang
developers, but in the mean time, we guard the few uncompilable lines of code,
to save Xcode 5 developers in general from being dead in the water while the
issue is addressed. When the compiler is fixed, the #ifdef can be redacted.
//-*****************************************************************************
//-*****************************************************************************
AbcA::ObjectReaderPtr ArImpl::getTop()
{
AbcA::ObjectReaderPtr ret = m_top.lock();
if ( ! ret )
{
// time to make a new one
#ifdef __llvm__
AbcA::ObjectReader* foo = new OrImpl( shared_from_this(), m_data, m_header );
ret.reset(foo);
#else
ret.reset( new OrImpl( shared_from_this(), m_data, m_header ) );
#endif
m_top = ret;
}
return ret;
}
Original comment by Nick.Por...@gmail.com
on 24 Sep 2013 at 3:39
Sadly, I spoke too soon. Although the trick works here to satisfy the compiler,
it does not work in all cases. Rather than continuing to try to come up with a
workaround, I'll focus on the stand alone compiler bug demonstrator.
Original comment by Nick.Por...@gmail.com
on 24 Sep 2013 at 4:51
Could you specify the cases it does NOT work for?
Original comment by miller.lucas
on 24 Sep 2013 at 6:25
The solution above worked for me in all cases. While it's a clang issue, if
anyone on needs a quick and dirty fix, here's a patch.
Original comment by matysiew...@gmail.com
on 18 Oct 2013 at 12:07
Attachments:
Howdy!
Here are all the changes I had to make in order to get this compiling on OSX
Mavericks with -stc=c++11. It compiles, and I can run SImpleAbcViewer on my
old HDF5 files, and it works. However, a lot of the regression tests fail.
I've attached the tests log.
Original comment by blackencino
on 25 Oct 2013 at 11:59
Attachments:
[deleted comment]
I should add that this patch (comment #8) includes the patch above from comment
#7 (thank you!!!)
Original comment by blackencino
on 26 Oct 2013 at 12:04
[deleted comment]
I believe this should fix the issues originally mentioned:
http://code.google.com/r/millerlucas-dev/source/detail?r=a422798ab84938a81b43aae
1c3e39faee4db6409
Original comment by miller.lucas
on 29 Oct 2013 at 4:49
Miller, your patch works. Here's one more bit that needs fixing.
in alembic/examples/bin/AbcTree/AbcTree.cpp, int i = 0 should be renamed int iseg = 0, or similar.
int iseg = 0;
while ( std::getline( ss, segment, '/' ) ) {
if ( !isFile ( fp.str() ) ) {
if ( iseg != 0 )
fp << "/";
fp << segment;
} else {
seglist.push_back( segment );
}
++iseg;
}
Original comment by Nick.Por...@gmail.com
on 3 Nov 2013 at 6:00
I just finished reviewing my diffs. It looks like I made a mod to your patch.
valid() didn't exist for me, so I did this -
bool valid() const
{ return !!m_vals; }
instead in IGeomParam.h. I think that has the same meaning?
Original comment by Nick.Por...@gmail.com
on 3 Nov 2013 at 6:15
What is the warning for the original?
bool valid() const { return m_vals; }
If the explicit bool conversion is having issues, this would be a little
clearer:
bool valid() const { return m_vals.get() != NULL; }
Original comment by miller.lucas
on 2 Dec 2013 at 10:00
I just tried Alembic 1.5.3 and after fixing the C++11 problem on Mavericks (OS
X 10.9), the only fix I had to do was to apply this replacement, i.e
bool valid() const { return m_vals; }
in IGeomParam.h needs to become
bool valid() const { return m_vals != NULL; }
for a successful OS X build.
Original comment by marcel.r...@googlemail.com
on 19 Dec 2013 at 11:55
I think all of the issues were successfully addressed in Alembic 1.5.4
Original comment by miller.lucas
on 25 Jun 2014 at 9:50
Original issue reported on code.google.com by
Nick.Por...@gmail.com
on 14 Sep 2013 at 5:23