OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Bluse-Blue - 07.01.2019
Last edited by Hans Dedecker - 08.01.2019

FS#2050 - /tools/CMAKE @trunk for x86_64 doe's not compile under OSX

Hi all,

I tried to build a fresh OpenWrt image from trunk for my PCEngines APU 2c3 x86_64 board.
After a make clean & make I get the following compile error where CMAKE from host-tools is complaining with

make[6]: Entering directory '/tmp/openwrt/build_dir/host/cmake-3.12.4'
[  1%] Linking C executable cmsysTestProcess
ld: warning: ignoring file libcmsys_c.a, file was built for archive which is not the architecture being linked (x86_64): libcmsys_c.a
Undefined symbols for architecture x86_64:
  "_cmsysProcess_Delete", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Disown", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Execute", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetErrorString", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetExceptionString", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetExitException", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetExitValue", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetState", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Interrupt", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Kill", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_New", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetCommand", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetOption", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetPipeShared", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetTimeout", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_WaitForData", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_WaitForExit", referenced from:
      _runChild in testProcess.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[6]: *** [Source/kwsys/CMakeFiles/cmsysTestProcess.dir/build.make:85: Source/kwsys/cmsysTestProcess] Error 1
make[6]: Leaving directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[5]: *** [CMakeFiles/Makefile2:1033: Source/kwsys/CMakeFiles/cmsysTestProcess.dir/all] Error 2
make[5]: Leaving directory '/tmp/openwrt/build_dir/host/cmake-3.12.4'
make[4]: *** [Makefile:163: all] Error 2

As a first good guess, maybe the “AR” archiver used is not the correct one and should be the local OSX installed one ?
Anybody else having this issue or has a hint how to solve this ?

Thx for helping
Bluse

Closed by  Hans Dedecker
08.01.2019 21:44
Reason for closing:  Not a bug
Bluse-Blue commented on 07.01.2019 16:40

troubleshooting update:

I have changes my OSX env to use binutils and hence gmake and the gnu archiver AR:

echo 'export PATH="/usr/local/opt/binutils/bin:$PATH"' >> ~/.zshrc

./tools/cmake does no compile with the following error:

-- Generating done
-- Build files have been written to: /Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4
---------------------------------------------
CMake has bootstrapped.  Now run gmake.
touch /Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4/.configured
CFLAGS="-O2 -I/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/staging_dir/host/include " CPPFLAGS="-I/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/staging_dir/host/include " CXXFLAGS="" LDFLAGS="-L/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/staging_dir/host/lib " make  -C /Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4
make[3]: Entering directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[4]: Entering directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[5]: Entering directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
Scanning dependencies of target cmsys_c
make[5]: Leaving directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[5]: Entering directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
[  0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/ProcessUNIX.c.o
[  0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/Base64.c.o
[  0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/EncodingC.c.o
[  0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/MD5.c.o
[  0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/Terminal.c.o
[  0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/System.c.o
[  1%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/String.c.o
[  1%] Linking C static library libcmsys_c.a
make[5]: Leaving directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
[  1%] Built target cmsys_c
make[5]: Entering directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
Scanning dependencies of target cmsysTestProcess
make[5]: Leaving directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[5]: Entering directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
[  1%] Building C object Source/kwsys/CMakeFiles/cmsysTestProcess.dir/testProcess.c.o
[  1%] Linking C executable cmsysTestProcess
ld: warning: ignoring file libcmsys_c.a, file was built for archive which is not the architecture being linked (x86_64): libcmsys_c.a
Undefined symbols for architecture x86_64:
  "_cmsysProcess_Delete", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Disown", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Execute", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetErrorString", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetExceptionString", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetExitException", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetExitValue", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_GetState", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Interrupt", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_Kill", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_New", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetCommand", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetOption", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetPipeShared", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_SetTimeout", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_WaitForData", referenced from:
      _runChild in testProcess.c.o
  "_cmsysProcess_WaitForExit", referenced from:
      _runChild in testProcess.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [Source/kwsys/CMakeFiles/cmsysTestProcess.dir/build.make:85: Source/kwsys/cmsysTestProcess] Error 1
make[5]: Leaving directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[4]: *** [CMakeFiles/Makefile2:1033: Source/kwsys/CMakeFiles/cmsysTestProcess.dir/all] Error 2
make[4]: Leaving directory '/Users/bluse/Desktop/Coding-Area/openwrt/openwrt/build_dir/host/cmake-3.12.4'
make[3]: *** [Makefile:163: all] Error 2
Bluse-Blue commented on 08.01.2019 11:11

issue solved, I had to point to the right OSX ar (based on this stackoverflow discussion [1])

[1] https://stackoverflow.com/questions/30948807/static-library-link-issue-with-mac-os-x-symbols-not-found-for-architecture-x8/30949054

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing