Build fails almost completely. See attached Allwmake.log for details. Should I be doing something different here? I followed the build notes to the tee.
Can you please specify compiler type and OS. It looks like you are building 32-bit and we are missing an ifdef. If you want to try and hack it, please go to Hash.H and comment out second specialisation on line 101.
Hrv
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So before we can instantiate a Hash<intptr_t> in the definition of template<> class Hash<void*>, we need to make sure the specialized template Hash<Foam::label> (or Hash<int>) is defined first.
So on a 32-bit platform, the definition of template<> class Hash<Foam::label> has to come before template<> class Hash<void*>.
This is why the compiler is complaining with this error message : error: specialization of 'Foam::Hash<int>' after instantiation, which is exactly what we have with the current code.
Luckily, the fix is very simple. Just swap the two class specializations in Hash.H
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That change doesn't fix it for me. I moved template<> class Hash<Foam::label> above template<> class Hash<void*>, and I still get the specialization before instantiation error.
Edit: I neglected the lnInclude/Hash.H, and changed it. That prevented that specific error, but didn't correct the many others I had.
Again, am I missing something big here? Shall I post my prefs.sh.mingw and bashrc.mingw?
Last edit: Paul 2015-10-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your work, Martin. I believe that I followed the instructions in doc/buildInstructions/Windows/README.txt.
Attached are the results of sourcing bashrc.mingw.
Perhaps the issue here has been spaces in actual install directories. I used mklink to create no-space links, but perhaps that doesn't work.
Edit: I don't think the spaces in original locations are the issue here.
Attached ThirdParty/mingw/build.log
Attaching createWindowsBinaryPackage.log
Can you please specify compiler type and OS. It looks like you are building 32-bit and we are missing an ifdef. If you want to try and hack it, please go to Hash.H and comment out second specialisation on line 101.
Hrv
I have the exact same error messages while compiling on a 32-bit Arch Linux platform.
Using gcc 5.2.0, which might play a role here too.
OS type is Windows 8.1 64-bit
compiler is mingw-w64 (https://sourceforge.net/projects/mingw-w64/)
Did I get the wrong compiler?
The trick for me was to move the definition of
template<> class Hash<Foam::label>
ahead of the definition of
template<> class Hash<void*>
in Hash.H
The compilation is going fine now...
Still trying to figure it out though...
Last edit: Martin Beaudoin 2015-10-18
Ok. Got it. On a 32-bit platform, we have:
typedef int intptr_t;
typedef int Foam::label
So before we can instantiate a Hash<intptr_t> in the definition of template<> class Hash<void*>, we need to make sure the specialized template Hash<Foam::label> (or Hash<int>) is defined first.
So on a 32-bit platform, the definition of template<> class Hash<Foam::label> has to come before template<> class Hash<void*>.
This is why the compiler is complaining with this error message : error: specialization of 'Foam::Hash<int>' after instantiation, which is exactly what we have with the current code.
Luckily, the fix is very simple. Just swap the two class specializations in Hash.H
Martin
I'm trying to compile to a 64 bit platform.
g++ -v
returnsLast edit: Paul 2015-10-20
That change doesn't fix it for me. I moved template<> class Hash<Foam::label> above template<> class Hash<void*>, and I still get the specialization before instantiation error.
Edit: I neglected the lnInclude/Hash.H, and changed it. That prevented that specific error, but didn't correct the many others I had.
Again, am I missing something big here? Shall I post my prefs.sh.mingw and bashrc.mingw?
Last edit: Paul 2015-10-19
Indeed, the modification I am suggesting will only affect 32-bit platforms. The Windows port is still targeting a 64-bit platform by default.
When I worked on adapting the testHarness for the Windows platform, I had no problem with the compilation of foam-extend.
Thanks for your work, Martin. I believe that I followed the instructions in doc/buildInstructions/Windows/README.txt.
Attached are the results of sourcing bashrc.mingw.
Perhaps the issue here has been spaces in actual install directories. I used mklink to create no-space links, but perhaps that doesn't work.
Edit: I don't think the spaces in original locations are the issue here.
Last edit: Paul 2015-10-20