Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*nix script build-all.py improved: solves the Issues #637 (segmentation fault 11) for Mac OS X #643

Open
wants to merge 8 commits into
base: v0.6.0
Choose a base branch
from

Conversation

atibaut
Copy link
Contributor

@atibaut atibaut commented Jul 21, 2019

Improvements:

  • use of system installed python in the build-all.py script for Mac OS X
  • reverted to the use of swig 3.0.12 for the time being becaue swig version 4.0 causes error in the build process with Mac OS X
  • use of the to_pystring() was minimized

Improvements:
- use of system installed python in the build-all.py script for Mac OS X
- reverted to the use of swig 3.0.12 for the time being becaue swig version 4.0 causes error in the build process with Mac OS X
- use of the to_pystring() was minimized
nix/build-all.py Outdated
download_tool_git = "git"

if which(wget) != None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why you re-enabled this related to wget and curl? Or was it a merge error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't touch this part specifically. But, the code looks ok, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't touch this part specifically.

Then it was probably a merge error.

But, the code looks ok, right?

These bits of code were removed recently (on Jun 30: 51cf52c) wget was giving issues on older distros due to all the changes in certificates and TLS recently. But now you're adding them back in your pull request.

I hope you can review the changes in your PR and remove the unintentional and whitespace changes. If you have time for making your change conditional that would be great as well. Let me know, I can also assist.

nix/build-all.py Outdated Show resolved Hide resolved
@aothms
Copy link
Member

aothms commented Jul 22, 2019

Many thanks for this. I'll need to have a look with git diff -w because it seems a lot of indent formatting changes got committed. Is there a chance you can make this behaviour change conditional (like python build-all.py --use-system-python)? Because I still need the entire build matrix for the release builds.

@atibaut
Copy link
Contributor Author

atibaut commented Jul 22, 2019

Many thanks for this. I'll need to have a look with git diff -w because it seems a lot of indent formatting changes got committed. Is there a chance you can make this behaviour change conditional (like python build-all.py --use-system-python)? Because I still need the entire build matrix for the release builds.

Yes, this would be better approach. I can do the change and commit again.

* 'v0.6.0' of github.com:atibaut/IfcOpenShell:
  Only pull when on a branch
  -pthread on unix
  fix po::value
  Threads in python app
  Cleanup concurrently created breps and triangulations
  Write progress for threaded conversion
  Some fixes to threading work
  Implement multi_threaded implementation in Iterator
  Last commit for multithreading, Airsquire implementation
  Sander boer's change for multithreading 1. Added multithread for create element 2. Added support function in IfcConvert.cpp for multithreading at bottom
  .clang-format settings indent=2 for me, temporarily. style=allman width=80
  builds nicely, but chokes immediately on serializer- first element, needs debugging
  Linearizing the use of IfcGeomIterator by integrating it into IfcConvert in full, atm it does not build.
  merge with ifcopenshell
  Too lazy to comment
@atibaut
Copy link
Contributor Author

atibaut commented Aug 7, 2019

First part resolved (whitespaces, unintentional wget, renamed back to build_dependencies). Second part (conditional use of system python, example python3 build-all.py --use-system-python) will follow.

@atibaut
Copy link
Contributor Author

atibaut commented Aug 8, 2019

OK, now after c497b89 I got following error:

-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BINDIR: /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/ifcopenshell/bin
-- INCLUDEDIR: /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/ifcopenshell/include
-- LIBDIR: /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/ifcopenshell/lib
-- JSON for Modern C++ header file found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Boost version: 1.59.0
-- Found the following Boost libraries:
--   system
--   program_options
--   regex
--   thread
--   date_time
-- Boost include files found in /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/boost-1.59.0
-- Boost libraries found in /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/boost-1.59.0/lib
-- Looking for Open CASCADE include files in: /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/occt-7.3.0p3/include/opencascade
-- Header files found
-- Looking for Open CASCADE library files in: /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/install/occt-7.3.0p3/lib
-- Library files found
-- OpenCOLLADA library files found
-- OpenCOLLADA header files found
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/andrejt/Research/repositories/git/IfcOpenShell/build/Darwin/18.7.0/x86_64/build/ifcopenshell/executables
Scanning dependencies of target IfcParse
[  1%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc2x3-schema.cpp.o
[  2%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc2x3.cpp.o
[  3%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4-schema.cpp.o
[  4%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4.cpp.o
[  6%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x1.cpp.o
[  6%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x1-schema.cpp.o
[  7%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x2-schema.cpp.o
[  8%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x2.cpp.o
[  9%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/IfcCharacterDecoder.cpp.o
[ 10%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/IfcGlobalId.cpp.o
[ 11%] Building CXX object CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/IfcHierarchyHelper.cpp.o
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc2x3.cpp:30:
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcWrite.h:42:
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: error: type of thread-local variable has non-trivial destruction
                        static my_thread_local std::string s;
                                                           ^
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: note: use 'thread_local' to allow this
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4.cpp:30:
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcWrite.h:42:
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: error: type of thread-local variable has non-trivial destruction
                        static my_thread_local std::string s;
                                                           ^
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: note: use 'thread_local' to allow this
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x1.cpp:30:
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcWrite.h:42:
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: error: type of thread-local variable has non-trivial destruction
                        static my_thread_local std::string s;
                                                           ^
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: note: use 'thread_local' to allow this
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x2.cpp:30:
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcWrite.h:42:
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: error: type of thread-local variable has non-trivial destruction
                        static my_thread_local std::string s;
                                                           ^
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: note: use 'thread_local' to allow this
1 error generated.
make[2]: *** [CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc2x3.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4.cpp.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x1.cpp.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/Ifc4x2.cpp.o] Error 1
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/IfcHierarchyHelper.cpp:30:
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcHierarchyHelper.h:41:
In file included from /Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcFile.h:30:
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: error: type of thread-local variable has non-trivial destruction
                        static my_thread_local std::string s;
                                                           ^
/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/../ifcparse/IfcParse.h:159:39: note: use 'thread_local' to allow this
1 error generated.
make[2]: *** [CMakeFiles/IfcParse.dir/Users/andrejt/Research/repositories/git/IfcOpenShell/src/ifcparse/IfcHierarchyHelper.cpp.o] Error 1
make[1]: *** [CMakeFiles/IfcParse.dir/all] Error 2
make: *** [all] Error 2

Has ifcParse.h been changed in between?
Before that the build was successful.

@aothms
Copy link
Member

aothms commented Aug 8, 2019

Yes, support for multithreading was merged, and apparently clang isn't happy with it. I have added clang to the Travis testing environment, and indeed the same error is reported there https://travis-ci.org/IfcOpenShell/IfcOpenShell/jobs/569276027#L1022 Hope to have time tomorrow to address this. Thanks for reporting.

@aothms
Copy link
Member

aothms commented Aug 9, 2019

Example: python build-all.py --use_system_python
@atibaut
Copy link
Contributor Author

atibaut commented Aug 11, 2019

I think the Appveyor (for Win) Cmake error check has nothing to do with my commit. Can you check, please?

@atibaut
Copy link
Contributor Author

atibaut commented Aug 15, 2019

@aothms can u check the AppVeyor build?

@atibaut
Copy link
Contributor Author

atibaut commented Oct 9, 2019

@aothms can u please check the AppVeyor build and tell me what could possibly be wrong here?

@mudin
Copy link

mudin commented Nov 24, 2020

Will this PR be merged?
looking forward to build with single line on OSX :)

@aothms
Copy link
Member

aothms commented Nov 29, 2020

@mudin can you check? Did it work for you? I don't have an OSX machine near me. Overall the changes look good to me.

@mudin
Copy link

mudin commented Nov 29, 2020

@aothms Still not working:

b'CMake Error at CMakeLists.txt:92 (message):\n The C++ compiler does not support C++11 (e.g. std::unique_ptr).\n\n\n'

@aothms
Copy link
Member

aothms commented Dec 1, 2020

@mudin what's your version of XCode and OSX/macOS? Do you have installed additional compilers on your system?

@mudin
Copy link

mudin commented Dec 1, 2020

@aothms thank you for the response.
I have macOS Catalina Version 10.15.6 with XCode Version 12.2.
java, cmake is installed.

@aothms
Copy link
Member

aothms commented Dec 2, 2020

@mudin do you have the complete log? Somewhere in IfcOpenShell/build/10.15/logs I think. Apparently something wrong with selection of compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants