KiCad / KicadOSXBuilder

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

Build fails on step 5 #43

Open microbug opened 10 years ago

microbug commented 10 years ago

I've been trying to compile KiCad for a while using the script now. My build fails at step 5:

-- Looking for getc_unlocked - found
-- Found PythonInterp: /usr/bin/python (found suitable version "2.7.5", required is "2.6")
-- Check for installed Python Interpreter -- found
-- Python module install path: /Users/Richard/Documents/KiCad/output/python/site-packages
-- Found PythonLibs: /System/Library/Frameworks/Python.framework/Versions/2.6/Python (found suitable version "2.6.8", required is "2.6")
-- Bazaar version control system version  found.
-- Kicad Bazaar build version: (2014-08-21 BZR 5087)
-- Found SWIG: /opt/local/bin/swig (found version "3.0.2") 
-- Found Doxygen: /opt/local/bin/doxygen (found version "1.8.7") 
-- Found OpenSSL: /opt/local/lib/libssl.dylib;/opt/local/lib/libcrypto.dylib (found version "1.0.1i") 
CMake Error at pcbnew/CMakeLists.txt:722 (add_dependencies):
  Cannot add target-level dependencies to non-existent target
  "osx_fix_bundles".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
  add file-level dependencies see the DEPENDS option of the add_custom_target
  and add_custom_command commands.

-- Configuring incomplete, errors occurred!
See also "/Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeOutput.log".
See also "/Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeError.log".
make: *** No rule to make target `install'.  Stop.
build error on BUILD KICAD  STEP: 5

Final entry in CMakeError.log:

Run Build Command:"/usr/bin/make" "cmTryCompileExec3454741884/fast"
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTryCompileExec3454741884.dir/build.make CMakeFiles/cmTryCompileExec3454741884.dir/build
/opt/local/bin/cmake -E cmake_progress_report /Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3454741884.dir/CheckFunctionExists.c.o
/usr/bin/cc   -Wall    -fPIC -D__ASSERTMACROS__ -mmacosx-version-min=10.5 -DCHECK_FUNCTION_EXISTS=clock_gettime -arch x86_64   -o CMakeFiles/cmTryCompileExec3454741884.dir/CheckFunctionExists.c.o   -c /opt/local/share/cmake-3.0/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec3454741884
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3454741884.dir/link.txt --verbose=1
/usr/bin/cc  -Wall    -fPIC -D__ASSERTMACROS__ -mmacosx-version-min=10.5 -DCHECK_FUNCTION_EXISTS=clock_gettime -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTryCompileExec3454741884.dir/CheckFunctionExists.c.o  -o cmTryCompileExec3454741884  -lrt 
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTryCompileExec3454741884] Error 1
make: *** [cmTryCompileExec3454741884/fast] Error 2

Last bits of CMakeOutput.log:

Determining if the getc_unlocked exist passed with the following output:
Change Dir: /Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec3894027736/fast"
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTryCompileExec3894027736.dir/build.make CMakeFiles/cmTryCompileExec3894027736.dir/build
/opt/local/bin/cmake -E cmake_progress_report /Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3894027736.dir/CheckSymbolExists.c.o
/usr/bin/cc   -Wall    -fPIC -D__ASSERTMACROS__ -mmacosx-version-min=10.5  -arch x86_64   -o CMakeFiles/cmTryCompileExec3894027736.dir/CheckSymbolExists.c.o   -c /Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec3894027736
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3894027736.dir/link.txt --verbose=1
/usr/bin/cc  -Wall    -fPIC -D__ASSERTMACROS__ -mmacosx-version-min=10.5  -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTryCompileExec3894027736.dir/CheckSymbolExists.c.o  -o cmTryCompileExec3894027736  

File /Users/Richard/Documents/KiCad/build/kicad/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdio.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef getc_unlocked
  return ((int*)(&getc_unlocked))[argc];
#else
  (void)argc;
  return 0;
#endif
}

I don't know what's going wrong here; has anyone got a solution?

adamwolf commented 10 years ago

Hi folks,

I'm going to upload a new version of KicadOSXBuilder very soon.

Adam Wolf

microbug commented 10 years ago

OK, thanks!

~Richard

microbug commented 10 years ago

@adamwolf another thing you should probably add (if it's not already there) is automatic downloading of the patches - I had to make the patches directory and download the patches manually.

adamwolf commented 10 years ago

I hope to upload my version on Sunday, but I have a 2 month old... so who knows.

microbug commented 10 years ago

Better late than never!

pda commented 10 years ago

FYI I'm also getting the same or similar CMake / osx_fix_bundles error on OS X 10.9.4 with Apple LLVM version 5.1 (clang-503.0.40):

…
-- Kicad Bazaar build version: (2014-08-24 BZR 5095)
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.8")
CMake Error at pcbnew/CMakeLists.txt:722 (add_dependencies):
  Cannot add target-level dependencies to non-existent target
  "osx_fix_bundles".
apzimmer commented 10 years ago

Any luck with a fix?

Thanks!!

microbug commented 10 years ago

@adamwolf any progress? ;)

sprhawk commented 10 years ago

@microbug I'm trying to build manually, but stuck at the end of linking, which complains no TLS_*\ reference, all other components are built.

I installed all necessary lib such as glew, swig, wxWidgets, then (according to Documentaion/compiling/mac-osx.txt), in kicad source directory

mkdir build; cd build
cmake ../ -DKICAD_BUILD_DYNAMIC=ON
make swig
cmake ../ -DKICAD_BUILD_DYNAMIC=ON -DKICAD_SKIP_BOOST=ON -DwxWidgets_CONFIG_EXECUTABLE=/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" -DPYTHON_EXECUTABLE=`which python`
cd common
make
cd ..
make
adamwolf commented 10 years ago

Hi sprhawk,

try all that without the build/ folder. I am unable to get builds to work on OS X with a build folder.

Adam Wolf

On Sun, Aug 31, 2014 at 12:31 PM, sprhawk notifications@github.com wrote:

@microbug https://github.com/microbug I'm trying to build manually, but stuck at the end of linking, which complains no TLS_*\ reference, all other components are built.

I installed all necessary lib such as glew, swig, wxWidgets, then (according to Documentaion/compiling/mac-osx.txt)

mkdir build; cd build cmake ../ -DKICAD_BUILD_DYNAMIC=ON make swig cmake ../ -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING_MODULES=ON cd common make cd .. make

— Reply to this email directly or view it on GitHub https://github.com/KiCad/KicadOSXBuilder/issues/43#issuecomment-53994954 .

eroomde commented 10 years ago

I'm getting an identical error to @microbug, so I won't repost the logs here. Let me know if there's anything I can do to help test a newer version of the build script.

paulgittings commented 10 years ago

The osx_fix_bundles target is in the main CMakeLists.txt and is created when KICAD_BUILD_DYNAMIC exists. A MacOS build should be dynamic (I assumed linked) right?

In build/kicacd/CmkaeCahce.txt the KICAD_BUILD_DYNAMIC is set to "off". Therefore the osx_fix_bundles target doesn't get created. Setting it to on for me results in another error "SWIG not found" even though the swig executable is on my path.

scottnla commented 9 years ago

Hello,

I've run into this same error on OSX 10.8.5. Is there a fix available yet?