KiCad / KicadOSXBuilder

Kicad OSX Builder, which I plan to use as my boxed development environment on Mac OSX
87 stars 27 forks source link

Step 5 - Boost compilation issue #29

Open paymail opened 10 years ago

paymail commented 10 years ago

Everything up to Step 5 seems to build ok

./build.sh -a x86_64 -c 8 -d -s 5

[ 33%] Building CXX object bitmaps_png/CMakeFiles/bitmaps.dir/cpp_48/libedit_icon.cpp.o Building CXX object bitmaps_png/CMakeFiles/bitmaps.dir/cpp_48/viewlibs_icon.cpp.o Building CXX object bitmaps_png/CMakeFiles/bitmaps.dir/cpp_48/icon_pagelayout_editor.cpp.o Linking CXX static library libbitmaps.a [ 33%] Built target bitmaps

Component configuration:

- atomic                   : not building
- chrono                   : not building
- context                  : building
- coroutine                : not building
- date_time                : building
- exception                : not building
- filesystem               : building
- graph                    : not building
- graph_parallel           : not building
- iostreams                : building
- locale                   : building
- log                      : not building
- math                     : not building
- mpi                      : not building
- program_options          : building
- python                   : not building
- random                   : not building
- regex                    : building
- serialization            : not building
- signals                  : not building
- system                   : building
- test                     : not building
- thread                   : building
- timer                    : not building
- wave                     : not building

...patience... ...patience... ...found 22220 targets... ...updating 4 targets... darwin.compile.c++ bin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi/unsupported.o libs/context/src/unsupported.cpp:7:2: error: "platform not supported"

error "platform not supported"

^ 1 error generated.

"g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -arch i386 -mmacosx-version-min=10.5  -fno-common -fno-lto -arch x86_64 -fPIC -arch x86_64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp"

...failed darwin.compile.c++ bin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi/unsupported.o... ...skipped <pbin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi>libboost_context.a(clean) for lack of <pbin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi>unsupported.o... ...skipped <pbin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi>libboost_context.a for lack of <pbin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi>unsupported.o... ...skipped <p/Users/mctouch/code/KicadOSXBuilder/src/kicad/boost_root/lib>libboost_context.a for lack of <pbin.v2/libs/context/build/darwin-4.2.1/release/architecture-x86/link-static/threading-multi>libboost_context.a... ...failed updating 1 target... ...skipped 3 targets... make[2]: * [/Users/mctouch/code/KicadOSXBuilder/src/kicad/.downloads-by-cmake/boost_1_54_0/src/boost-stamp/boost-build] Error 1 make[1]: * [CMakeFiles/boost.dir/all] Error 2 make: *\ [all] Error 2 build error on BUILD KICAD STEP: 5

Donny3000 commented 10 years ago

I was having the exact same issue on my Macbook Pro running OSX 10.9.1 and clang. The problem is that Boost starting with version 1.53 has moved away from supporting the 32-bit address model for the context library. What I had to do was modify the project-config.jam file in _src/kicad/.downloads-by-cmake/boost_1_540/src/boost/project-config.jam to only generate code for the x86_64 architecture and 64-bit Boost address model. So changing,

using darwin ;

to

using clang : osx : xcrun clang -arch x86_64 -stdlib=libc++ -std=c++11 -mmacosx-version-min=10.7 -fvisibility-inlines-hidden ;

to only build a 64-bit library. Then also changing,

project : default-build <toolset>darwin ;

to

project : default-build <toolset>clang-osx <address-model>64 ;

to only support the 64-bit address model so the context library will be supported/built.

This should resolve the Step 5 build error issue. I think the build.sh script should include a patch to the project-config.jam file including these changes if Boost 1.53+ is desirable for this project.

chrismiles commented 10 years ago

That got the build working for me, thanks!

Unfortunately the build is too broken on OS X to be usable. Canvas drawing is a bit messed up, full of ghost images. And the library table is empty/unmanageable.

Donny3000 commented 10 years ago

Those were my same observations as well. Hopefully those issuses are being addresses (or will be addressed) to bring the OSX variant up to par.

guymadison commented 10 years ago

Thanks all, I was looking forward to trying this out. But I wasn't ready to sit down and debug yet another bad build process for OSX.

On Jan 30, 2014, at 8:48 AM, Donald R. Poole, Jr. notifications@github.com wrote:

Those were my same observations as well. Hopefully those issuses are being addresses (or will be addressed) to bring the OSX variant up to par.

— Reply to this email directly or view it on GitHub.

paymail commented 10 years ago

Great thanks, this solution actually solved build issues with another project I have been trying to get up and running.

On 30 Jan 2014, at 17:27, guymadison notifications@github.com wrote:

Thanks all, I was looking forward to trying this out. But I wasn't ready to sit down and debug yet another bad build process for OSX.

On Jan 30, 2014, at 8:48 AM, Donald R. Poole, Jr. notifications@github.com wrote:

Those were my same observations as well. Hopefully those issuses are being addresses (or will be addressed) to bring the OSX variant up to par.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.