You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Tarek Allam Jr." <t....@gmail.com> on 2019/09/19 15:24:52 UTC

Build issues on macOS [newbie]

Hi all,

Firstly I must apologies if what I put here is extremely trivial, but I am a
complete newcomer to the Apache Arrow project and contributing to Apache in
general, but I am very keen to get involved.

I'm hoping to help where I can so I recently attempted to complete a build
following the instructions laid out in the 'Python Development' section of the
documentation here:

After completing the steps that specifically uses Conda I was able to create an
environment but when it comes to building I am unable to do so.

I am on macOS -- 10.14.6 and as outlined in the docs and here (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk instead
of the latest. I have both added this manually using ccmake and also defining it
like so:

cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
      -DCMAKE_INSTALL_LIBDIR=lib \
      -DARROW_FLIGHT=ON \
      -DARROW_GANDIVA=ON \
      -DARROW_ORC=ON \
      -DARROW_PARQUET=ON \
      -DARROW_PYTHON=ON \
      -DARROW_PLASMA=ON \
      -DARROW_BUILD_TESTS=ON \
      -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
      -DARROW_DEPENDENCY_SOURCE=AUTO \
      ..

But it seems that whatever I try, I seem to get errors, the main only tripping
me up at the moment is:

-- Building using CMake version: 3.15.3
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
-- Check for working C compiler: /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
CMake Error at /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast && /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make CMakeFiles/cmTC_b252c.dir/build
    gmake[1]: Entering directory '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
    /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_b252c
    /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
    /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs  CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
    ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
    clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c] Error 1
    gmake[1]: Leaving directory '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2


  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:32 (project)

-- Configuring incomplete, errors occurred!
See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".

Does anyone have any insight as to what might be happening and causing this to
fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
/opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
that is not right..

I have tried to compare steps with ones outlined in
https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
corners of the internet but I feel very stuck at the moment. 

Any help would be greatly appreciated! Thank you


Re: Build issues on macOS [newbie]

Posted by Wes McKinney <we...@gmail.com>.
Thanks for letting us know. If there are any improvements we can make
to the developer documentation, please feel free to open a JIRA or a
pull request to fix

On Mon, Sep 30, 2019 at 8:13 AM Tarek Allam Jr. <t....@gmail.com> wrote:
>
>
> Hi Wes,
>
> Thank you very much, that indeed fixed things and allowed me to complete a build.
>
> After running conda install --file ci/conda_env_cpp.yml I was able to get passed
> the above error, but then was faced with the error message akin to that found at
> https://issues.apache.org/jira/browse/ARROW-4935
>
> But this was easily solved with running the suggested solution of
>
>     $ cd /Library/Developer/CommandLineTools/Packages/
>     $ open macOS_SDK_headers_for_macOS_10.14.pkg
>
> (Just putting links to the errors/issues for my reference)
>
> Thanks again for your help getting me started. I'll now go in search of possible
> areas of where I can contribute!
>
> Cheers,
> Tarek
>
>
> On 2019/09/26 19:23:08, Wes McKinney <we...@gmail.com> wrote:
> > It looks like the development toolchain dependencies in
> > conda_env_cpp.yml aren't installed in your "main" conda environment,
> > e.g.
> >
> > https://github.com/apache/arrow/blob/master/ci/conda_env_cpp.yml#L42
> >
> > You can see what's installed by running "conda list"
> >
> > Note that most of these dependencies are optional, but we provide the
> > env files to simplify general development of the project so
> > contributors aren't struggling to produce comprehensive builds.
> >
> > On Wed, Sep 25, 2019 at 11:33 AM Tarek Allam Jr. <t....@gmail.com> wrote:
> > >
> > > Thanks for the advice Uwe and Neal. I tried your suggestion (as well as turning many of the flags to off) but then ran into other errors afterwards such as:
> > >
> > > -- Using ZSTD_ROOT: /usr/local/anaconda3/envs/main
> > > CMake Error at /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
> > >   Could NOT find ZSTD (missing: ZSTD_LIB ZSTD_INCLUDE_DIR)
> > >   /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
> > >   cmake_modules/FindZSTD.cmake:61 (find_package_handle_standard_args)
> > >   cmake_modules/ThirdpartyToolchain.cmake:181 (find_package)
> > >   cmake_modules/ThirdpartyToolchain.cmake:2033 (resolve_dependency)
> > >   CMakeLists.txt:412 (include)
> > >
> > > I think I will spend some more time to understand CMAKE better and familiarise myself with the codebase more before having another go. Hopefully in this time conda-forge would have removed the SDK requirement as well which like you say should make things much more similar.
> > >
> > > Thanks again,
> > >
> > > Regards,
> > > Tarek
> > >
> > > On 2019/09/19 16:00:09, "Uwe L. Korn" <uw...@xhochy.com> wrote:
> > > > Hello Tarek,
> > > >
> > > > this error message is normally the one you get when CONDA_BUILD_SYSROOT doesn't point to your 10.9 SDK. Please delete your build folder again and do `export CONDA_BUILD_SYSROOT=..` immediately before running cmake. Running e.g. a conda install will sadly reset this variable to something different and break the build.
> > > >
> > > > As a sidenote: It looks like in 1-2 months that conda-forge will get rid of the SDK requirement, then this will be a bit simpler.
> > > >
> > > > Cheers
> > > > Uwe
> > > >
> > > > On Thu, Sep 19, 2019, at 5:24 PM, Tarek Allam Jr. wrote:
> > > > >
> > > > > Hi all,
> > > > >
> > > > > Firstly I must apologies if what I put here is extremely trivial, but I am a
> > > > > complete newcomer to the Apache Arrow project and contributing to Apache in
> > > > > general, but I am very keen to get involved.
> > > > >
> > > > > I'm hoping to help where I can so I recently attempted to complete a build
> > > > > following the instructions laid out in the 'Python Development' section of the
> > > > > documentation here:
> > > > >
> > > > > After completing the steps that specifically uses Conda I was able to create an
> > > > > environment but when it comes to building I am unable to do so.
> > > > >
> > > > > I am on macOS -- 10.14.6 and as outlined in the docs and here
> > > > > (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk
> > > > > instead
> > > > > of the latest. I have both added this manually using ccmake and also
> > > > > defining it
> > > > > like so:
> > > > >
> > > > > cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
> > > > >       -DCMAKE_INSTALL_LIBDIR=lib \
> > > > >       -DARROW_FLIGHT=ON \
> > > > >       -DARROW_GANDIVA=ON \
> > > > >       -DARROW_ORC=ON \
> > > > >       -DARROW_PARQUET=ON \
> > > > >       -DARROW_PYTHON=ON \
> > > > >       -DARROW_PLASMA=ON \
> > > > >       -DARROW_BUILD_TESTS=ON \
> > > > >       -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
> > > > >       -DARROW_DEPENDENCY_SOURCE=AUTO \
> > > > >       ..
> > > > >
> > > > > But it seems that whatever I try, I seem to get errors, the main only tripping
> > > > > me up at the moment is:
> > > > >
> > > > > -- Building using CMake version: 3.15.3
> > > > > -- The C compiler identification is Clang 4.0.1
> > > > > -- The CXX compiler identification is Clang 4.0.1
> > > > > -- Check for working C compiler:
> > > > > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
> > > > > -- Check for working C compiler:
> > > > > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
> > > > > CMake Error at
> > > > > /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
> > > > >   The C compiler
> > > > >
> > > > >     "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"
> > > > >
> > > > >   is not able to compile a simple test program.
> > > > >
> > > > >   It fails with the following output:
> > > > >
> > > > >     Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp
> > > > >
> > > > >     Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast &&
> > > > > /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make
> > > > > CMakeFiles/cmTC_b252c.dir/build
> > > > >     gmake[1]: Entering directory
> > > > > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> > > > >     Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
> > > > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2
> > > > > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
> > > > > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o
> > > > > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c
> > > > > /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
> > > > >     Linking C executable cmTC_b252c
> > > > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E
> > > > > cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
> > > > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2
> > > > > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
> > > > > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk
> > > > > -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie
> > > > > -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs
> > > > > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
> > > > >     ld: warning: ignoring file
> > > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
> > > > >     ld: dynamic main executables must link with libSystem.dylib for
> > > > > architecture x86_64
> > > > >     clang-4.0: error: linker command failed with exit code 1 (use -v to
> > > > > see invocation)
> > > > >     gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c]
> > > > > Error 1
> > > > >     gmake[1]: Leaving directory
> > > > > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> > > > >     gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2
> > > > >
> > > > >
> > > > >   CMake will not be able to correctly generate this project.
> > > > > Call Stack (most recent call first):
> > > > >   CMakeLists.txt:32 (project)
> > > > >
> > > > > -- Configuring incomplete, errors occurred!
> > > > > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
> > > > > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".
> > > > >
> > > > > Does anyone have any insight as to what might be happening and causing this to
> > > > > fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
> > > > > /opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
> > > > > that is not right..
> > > > >
> > > > > I have tried to compare steps with ones outlined in
> > > > > https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
> > > > > corners of the internet but I feel very stuck at the moment.
> > > > >
> > > > > Any help would be greatly appreciated! Thank you
> > > > >
> > > > >
> > > >
> >

Re: Build issues on macOS [newbie]

Posted by "Tarek Allam Jr." <t....@gmail.com>.
Hi Wes,

Thank you very much, that indeed fixed things and allowed me to complete a build.

After running conda install --file ci/conda_env_cpp.yml I was able to get passed
the above error, but then was faced with the error message akin to that found at
https://issues.apache.org/jira/browse/ARROW-4935

But this was easily solved with running the suggested solution of

    $ cd /Library/Developer/CommandLineTools/Packages/
    $ open macOS_SDK_headers_for_macOS_10.14.pkg

(Just putting links to the errors/issues for my reference)

Thanks again for your help getting me started. I'll now go in search of possible
areas of where I can contribute!

Cheers, 
Tarek


On 2019/09/26 19:23:08, Wes McKinney <we...@gmail.com> wrote: 
> It looks like the development toolchain dependencies in
> conda_env_cpp.yml aren't installed in your "main" conda environment,
> e.g.
> 
> https://github.com/apache/arrow/blob/master/ci/conda_env_cpp.yml#L42
> 
> You can see what's installed by running "conda list"
> 
> Note that most of these dependencies are optional, but we provide the
> env files to simplify general development of the project so
> contributors aren't struggling to produce comprehensive builds.
> 
> On Wed, Sep 25, 2019 at 11:33 AM Tarek Allam Jr. <t....@gmail.com> wrote:
> >
> > Thanks for the advice Uwe and Neal. I tried your suggestion (as well as turning many of the flags to off) but then ran into other errors afterwards such as:
> >
> > -- Using ZSTD_ROOT: /usr/local/anaconda3/envs/main
> > CMake Error at /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
> >   Could NOT find ZSTD (missing: ZSTD_LIB ZSTD_INCLUDE_DIR)
> >   /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
> >   cmake_modules/FindZSTD.cmake:61 (find_package_handle_standard_args)
> >   cmake_modules/ThirdpartyToolchain.cmake:181 (find_package)
> >   cmake_modules/ThirdpartyToolchain.cmake:2033 (resolve_dependency)
> >   CMakeLists.txt:412 (include)
> >
> > I think I will spend some more time to understand CMAKE better and familiarise myself with the codebase more before having another go. Hopefully in this time conda-forge would have removed the SDK requirement as well which like you say should make things much more similar.
> >
> > Thanks again,
> >
> > Regards,
> > Tarek
> >
> > On 2019/09/19 16:00:09, "Uwe L. Korn" <uw...@xhochy.com> wrote:
> > > Hello Tarek,
> > >
> > > this error message is normally the one you get when CONDA_BUILD_SYSROOT doesn't point to your 10.9 SDK. Please delete your build folder again and do `export CONDA_BUILD_SYSROOT=..` immediately before running cmake. Running e.g. a conda install will sadly reset this variable to something different and break the build.
> > >
> > > As a sidenote: It looks like in 1-2 months that conda-forge will get rid of the SDK requirement, then this will be a bit simpler.
> > >
> > > Cheers
> > > Uwe
> > >
> > > On Thu, Sep 19, 2019, at 5:24 PM, Tarek Allam Jr. wrote:
> > > >
> > > > Hi all,
> > > >
> > > > Firstly I must apologies if what I put here is extremely trivial, but I am a
> > > > complete newcomer to the Apache Arrow project and contributing to Apache in
> > > > general, but I am very keen to get involved.
> > > >
> > > > I'm hoping to help where I can so I recently attempted to complete a build
> > > > following the instructions laid out in the 'Python Development' section of the
> > > > documentation here:
> > > >
> > > > After completing the steps that specifically uses Conda I was able to create an
> > > > environment but when it comes to building I am unable to do so.
> > > >
> > > > I am on macOS -- 10.14.6 and as outlined in the docs and here
> > > > (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk
> > > > instead
> > > > of the latest. I have both added this manually using ccmake and also
> > > > defining it
> > > > like so:
> > > >
> > > > cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
> > > >       -DCMAKE_INSTALL_LIBDIR=lib \
> > > >       -DARROW_FLIGHT=ON \
> > > >       -DARROW_GANDIVA=ON \
> > > >       -DARROW_ORC=ON \
> > > >       -DARROW_PARQUET=ON \
> > > >       -DARROW_PYTHON=ON \
> > > >       -DARROW_PLASMA=ON \
> > > >       -DARROW_BUILD_TESTS=ON \
> > > >       -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
> > > >       -DARROW_DEPENDENCY_SOURCE=AUTO \
> > > >       ..
> > > >
> > > > But it seems that whatever I try, I seem to get errors, the main only tripping
> > > > me up at the moment is:
> > > >
> > > > -- Building using CMake version: 3.15.3
> > > > -- The C compiler identification is Clang 4.0.1
> > > > -- The CXX compiler identification is Clang 4.0.1
> > > > -- Check for working C compiler:
> > > > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
> > > > -- Check for working C compiler:
> > > > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
> > > > CMake Error at
> > > > /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
> > > >   The C compiler
> > > >
> > > >     "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"
> > > >
> > > >   is not able to compile a simple test program.
> > > >
> > > >   It fails with the following output:
> > > >
> > > >     Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp
> > > >
> > > >     Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast &&
> > > > /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make
> > > > CMakeFiles/cmTC_b252c.dir/build
> > > >     gmake[1]: Entering directory
> > > > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> > > >     Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
> > > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2
> > > > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
> > > > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o
> > > > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c
> > > > /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
> > > >     Linking C executable cmTC_b252c
> > > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E
> > > > cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
> > > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2
> > > > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
> > > > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk
> > > > -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie
> > > > -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs
> > > > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
> > > >     ld: warning: ignoring file
> > > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
> > > >     ld: dynamic main executables must link with libSystem.dylib for
> > > > architecture x86_64
> > > >     clang-4.0: error: linker command failed with exit code 1 (use -v to
> > > > see invocation)
> > > >     gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c]
> > > > Error 1
> > > >     gmake[1]: Leaving directory
> > > > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> > > >     gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2
> > > >
> > > >
> > > >   CMake will not be able to correctly generate this project.
> > > > Call Stack (most recent call first):
> > > >   CMakeLists.txt:32 (project)
> > > >
> > > > -- Configuring incomplete, errors occurred!
> > > > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
> > > > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".
> > > >
> > > > Does anyone have any insight as to what might be happening and causing this to
> > > > fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
> > > > /opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
> > > > that is not right..
> > > >
> > > > I have tried to compare steps with ones outlined in
> > > > https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
> > > > corners of the internet but I feel very stuck at the moment.
> > > >
> > > > Any help would be greatly appreciated! Thank you
> > > >
> > > >
> > >
> 

Re: Build issues on macOS [newbie]

Posted by Wes McKinney <we...@gmail.com>.
It looks like the development toolchain dependencies in
conda_env_cpp.yml aren't installed in your "main" conda environment,
e.g.

https://github.com/apache/arrow/blob/master/ci/conda_env_cpp.yml#L42

You can see what's installed by running "conda list"

Note that most of these dependencies are optional, but we provide the
env files to simplify general development of the project so
contributors aren't struggling to produce comprehensive builds.

On Wed, Sep 25, 2019 at 11:33 AM Tarek Allam Jr. <t....@gmail.com> wrote:
>
> Thanks for the advice Uwe and Neal. I tried your suggestion (as well as turning many of the flags to off) but then ran into other errors afterwards such as:
>
> -- Using ZSTD_ROOT: /usr/local/anaconda3/envs/main
> CMake Error at /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
>   Could NOT find ZSTD (missing: ZSTD_LIB ZSTD_INCLUDE_DIR)
>   /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
>   cmake_modules/FindZSTD.cmake:61 (find_package_handle_standard_args)
>   cmake_modules/ThirdpartyToolchain.cmake:181 (find_package)
>   cmake_modules/ThirdpartyToolchain.cmake:2033 (resolve_dependency)
>   CMakeLists.txt:412 (include)
>
> I think I will spend some more time to understand CMAKE better and familiarise myself with the codebase more before having another go. Hopefully in this time conda-forge would have removed the SDK requirement as well which like you say should make things much more similar.
>
> Thanks again,
>
> Regards,
> Tarek
>
> On 2019/09/19 16:00:09, "Uwe L. Korn" <uw...@xhochy.com> wrote:
> > Hello Tarek,
> >
> > this error message is normally the one you get when CONDA_BUILD_SYSROOT doesn't point to your 10.9 SDK. Please delete your build folder again and do `export CONDA_BUILD_SYSROOT=..` immediately before running cmake. Running e.g. a conda install will sadly reset this variable to something different and break the build.
> >
> > As a sidenote: It looks like in 1-2 months that conda-forge will get rid of the SDK requirement, then this will be a bit simpler.
> >
> > Cheers
> > Uwe
> >
> > On Thu, Sep 19, 2019, at 5:24 PM, Tarek Allam Jr. wrote:
> > >
> > > Hi all,
> > >
> > > Firstly I must apologies if what I put here is extremely trivial, but I am a
> > > complete newcomer to the Apache Arrow project and contributing to Apache in
> > > general, but I am very keen to get involved.
> > >
> > > I'm hoping to help where I can so I recently attempted to complete a build
> > > following the instructions laid out in the 'Python Development' section of the
> > > documentation here:
> > >
> > > After completing the steps that specifically uses Conda I was able to create an
> > > environment but when it comes to building I am unable to do so.
> > >
> > > I am on macOS -- 10.14.6 and as outlined in the docs and here
> > > (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk
> > > instead
> > > of the latest. I have both added this manually using ccmake and also
> > > defining it
> > > like so:
> > >
> > > cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
> > >       -DCMAKE_INSTALL_LIBDIR=lib \
> > >       -DARROW_FLIGHT=ON \
> > >       -DARROW_GANDIVA=ON \
> > >       -DARROW_ORC=ON \
> > >       -DARROW_PARQUET=ON \
> > >       -DARROW_PYTHON=ON \
> > >       -DARROW_PLASMA=ON \
> > >       -DARROW_BUILD_TESTS=ON \
> > >       -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
> > >       -DARROW_DEPENDENCY_SOURCE=AUTO \
> > >       ..
> > >
> > > But it seems that whatever I try, I seem to get errors, the main only tripping
> > > me up at the moment is:
> > >
> > > -- Building using CMake version: 3.15.3
> > > -- The C compiler identification is Clang 4.0.1
> > > -- The CXX compiler identification is Clang 4.0.1
> > > -- Check for working C compiler:
> > > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
> > > -- Check for working C compiler:
> > > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
> > > CMake Error at
> > > /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
> > >   The C compiler
> > >
> > >     "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"
> > >
> > >   is not able to compile a simple test program.
> > >
> > >   It fails with the following output:
> > >
> > >     Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp
> > >
> > >     Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast &&
> > > /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make
> > > CMakeFiles/cmTC_b252c.dir/build
> > >     gmake[1]: Entering directory
> > > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> > >     Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
> > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2
> > > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
> > > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o
> > > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c
> > > /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
> > >     Linking C executable cmTC_b252c
> > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E
> > > cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
> > >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2
> > > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
> > > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk
> > > -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie
> > > -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs
> > > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
> > >     ld: warning: ignoring file
> > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
> > >     ld: dynamic main executables must link with libSystem.dylib for
> > > architecture x86_64
> > >     clang-4.0: error: linker command failed with exit code 1 (use -v to
> > > see invocation)
> > >     gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c]
> > > Error 1
> > >     gmake[1]: Leaving directory
> > > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> > >     gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2
> > >
> > >
> > >   CMake will not be able to correctly generate this project.
> > > Call Stack (most recent call first):
> > >   CMakeLists.txt:32 (project)
> > >
> > > -- Configuring incomplete, errors occurred!
> > > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
> > > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".
> > >
> > > Does anyone have any insight as to what might be happening and causing this to
> > > fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
> > > /opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
> > > that is not right..
> > >
> > > I have tried to compare steps with ones outlined in
> > > https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
> > > corners of the internet but I feel very stuck at the moment.
> > >
> > > Any help would be greatly appreciated! Thank you
> > >
> > >
> >

Re: Build issues on macOS [newbie]

Posted by "Tarek Allam Jr." <t....@gmail.com>.
Thanks for the advice Uwe and Neal. I tried your suggestion (as well as turning many of the flags to off) but then ran into other errors afterwards such as:

-- Using ZSTD_ROOT: /usr/local/anaconda3/envs/main
CMake Error at /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find ZSTD (missing: ZSTD_LIB ZSTD_INCLUDE_DIR)
  /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/FindZSTD.cmake:61 (find_package_handle_standard_args)
  cmake_modules/ThirdpartyToolchain.cmake:181 (find_package)
  cmake_modules/ThirdpartyToolchain.cmake:2033 (resolve_dependency)
  CMakeLists.txt:412 (include)

I think I will spend some more time to understand CMAKE better and familiarise myself with the codebase more before having another go. Hopefully in this time conda-forge would have removed the SDK requirement as well which like you say should make things much more similar.

Thanks again, 

Regards, 
Tarek

On 2019/09/19 16:00:09, "Uwe L. Korn" <uw...@xhochy.com> wrote: 
> Hello Tarek,
> 
> this error message is normally the one you get when CONDA_BUILD_SYSROOT doesn't point to your 10.9 SDK. Please delete your build folder again and do `export CONDA_BUILD_SYSROOT=..` immediately before running cmake. Running e.g. a conda install will sadly reset this variable to something different and break the build.
> 
> As a sidenote: It looks like in 1-2 months that conda-forge will get rid of the SDK requirement, then this will be a bit simpler.
> 
> Cheers
> Uwe
> 
> On Thu, Sep 19, 2019, at 5:24 PM, Tarek Allam Jr. wrote:
> > 
> > Hi all,
> > 
> > Firstly I must apologies if what I put here is extremely trivial, but I am a
> > complete newcomer to the Apache Arrow project and contributing to Apache in
> > general, but I am very keen to get involved.
> > 
> > I'm hoping to help where I can so I recently attempted to complete a build
> > following the instructions laid out in the 'Python Development' section of the
> > documentation here:
> > 
> > After completing the steps that specifically uses Conda I was able to create an
> > environment but when it comes to building I am unable to do so.
> > 
> > I am on macOS -- 10.14.6 and as outlined in the docs and here 
> > (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk 
> > instead
> > of the latest. I have both added this manually using ccmake and also 
> > defining it
> > like so:
> > 
> > cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
> >       -DCMAKE_INSTALL_LIBDIR=lib \
> >       -DARROW_FLIGHT=ON \
> >       -DARROW_GANDIVA=ON \
> >       -DARROW_ORC=ON \
> >       -DARROW_PARQUET=ON \
> >       -DARROW_PYTHON=ON \
> >       -DARROW_PLASMA=ON \
> >       -DARROW_BUILD_TESTS=ON \
> >       -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
> >       -DARROW_DEPENDENCY_SOURCE=AUTO \
> >       ..
> > 
> > But it seems that whatever I try, I seem to get errors, the main only tripping
> > me up at the moment is:
> > 
> > -- Building using CMake version: 3.15.3
> > -- The C compiler identification is Clang 4.0.1
> > -- The CXX compiler identification is Clang 4.0.1
> > -- Check for working C compiler: 
> > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
> > -- Check for working C compiler: 
> > /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
> > CMake Error at 
> > /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
> >   The C compiler
> > 
> >     "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"
> > 
> >   is not able to compile a simple test program.
> > 
> >   It fails with the following output:
> > 
> >     Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp
> > 
> >     Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast && 
> > /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make 
> > CMakeFiles/cmTC_b252c.dir/build
> >     gmake[1]: Entering directory 
> > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> >     Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
> >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2 
> > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE 
> > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o 
> > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c 
> > /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
> >     Linking C executable cmTC_b252c
> >     /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E 
> > cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
> >     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2 
> > -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE 
> > -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk 
> > -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie 
> > -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs  
> > CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
> >     ld: warning: ignoring file 
> > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
> >     ld: dynamic main executables must link with libSystem.dylib for 
> > architecture x86_64
> >     clang-4.0: error: linker command failed with exit code 1 (use -v to 
> > see invocation)
> >     gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c] 
> > Error 1
> >     gmake[1]: Leaving directory 
> > '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
> >     gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2
> > 
> > 
> >   CMake will not be able to correctly generate this project.
> > Call Stack (most recent call first):
> >   CMakeLists.txt:32 (project)
> > 
> > -- Configuring incomplete, errors occurred!
> > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
> > See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".
> > 
> > Does anyone have any insight as to what might be happening and causing this to
> > fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
> > /opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
> > that is not right..
> > 
> > I have tried to compare steps with ones outlined in
> > https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
> > corners of the internet but I feel very stuck at the moment. 
> > 
> > Any help would be greatly appreciated! Thank you
> > 
> >
> 

Re: Build issues on macOS [newbie]

Posted by "Uwe L. Korn" <uw...@xhochy.com>.
Hello Tarek,

this error message is normally the one you get when CONDA_BUILD_SYSROOT doesn't point to your 10.9 SDK. Please delete your build folder again and do `export CONDA_BUILD_SYSROOT=..` immediately before running cmake. Running e.g. a conda install will sadly reset this variable to something different and break the build.

As a sidenote: It looks like in 1-2 months that conda-forge will get rid of the SDK requirement, then this will be a bit simpler.

Cheers
Uwe

On Thu, Sep 19, 2019, at 5:24 PM, Tarek Allam Jr. wrote:
> 
> Hi all,
> 
> Firstly I must apologies if what I put here is extremely trivial, but I am a
> complete newcomer to the Apache Arrow project and contributing to Apache in
> general, but I am very keen to get involved.
> 
> I'm hoping to help where I can so I recently attempted to complete a build
> following the instructions laid out in the 'Python Development' section of the
> documentation here:
> 
> After completing the steps that specifically uses Conda I was able to create an
> environment but when it comes to building I am unable to do so.
> 
> I am on macOS -- 10.14.6 and as outlined in the docs and here 
> (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk 
> instead
> of the latest. I have both added this manually using ccmake and also 
> defining it
> like so:
> 
> cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
>       -DCMAKE_INSTALL_LIBDIR=lib \
>       -DARROW_FLIGHT=ON \
>       -DARROW_GANDIVA=ON \
>       -DARROW_ORC=ON \
>       -DARROW_PARQUET=ON \
>       -DARROW_PYTHON=ON \
>       -DARROW_PLASMA=ON \
>       -DARROW_BUILD_TESTS=ON \
>       -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
>       -DARROW_DEPENDENCY_SOURCE=AUTO \
>       ..
> 
> But it seems that whatever I try, I seem to get errors, the main only tripping
> me up at the moment is:
> 
> -- Building using CMake version: 3.15.3
> -- The C compiler identification is Clang 4.0.1
> -- The CXX compiler identification is Clang 4.0.1
> -- Check for working C compiler: 
> /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
> -- Check for working C compiler: 
> /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
> CMake Error at 
> /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
>   The C compiler
> 
>     "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"
> 
>   is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
>     Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp
> 
>     Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast && 
> /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make 
> CMakeFiles/cmTC_b252c.dir/build
>     gmake[1]: Entering directory 
> '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
>     Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
>     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2 
> -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE 
> -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o 
> CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c 
> /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
>     Linking C executable cmTC_b252c
>     /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E 
> cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
>     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2 
> -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE 
> -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk 
> -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie 
> -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs  
> CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
>     ld: warning: ignoring file 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
>     ld: dynamic main executables must link with libSystem.dylib for 
> architecture x86_64
>     clang-4.0: error: linker command failed with exit code 1 (use -v to 
> see invocation)
>     gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c] 
> Error 1
>     gmake[1]: Leaving directory 
> '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
>     gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2
> 
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:32 (project)
> 
> -- Configuring incomplete, errors occurred!
> See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
> See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".
> 
> Does anyone have any insight as to what might be happening and causing this to
> fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
> /opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
> that is not right..
> 
> I have tried to compare steps with ones outlined in
> https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
> corners of the internet but I feel very stuck at the moment. 
> 
> Any help would be greatly appreciated! Thank you
> 
>

Re: Build issues on macOS [newbie]

Posted by Neal Richardson <ne...@gmail.com>.
Others have different experience, but I ultimately had better luck
using Homebrew for system dependencies rather than Conda.

You might also want to start with more cmake flags OFF, just to keep
things simpler while you work out the basic environment. Though your
current error is happening before any of that would matter.

Neal


On Thu, Sep 19, 2019 at 8:39 AM Tarek Allam Jr. <t....@gmail.com> wrote:
>
>
> Hi all,
>
> Firstly I must apologies if what I put here is extremely trivial, but I am a
> complete newcomer to the Apache Arrow project and contributing to Apache in
> general, but I am very keen to get involved.
>
> I'm hoping to help where I can so I recently attempted to complete a build
> following the instructions laid out in the 'Python Development' section of the
> documentation here:
>
> After completing the steps that specifically uses Conda I was able to create an
> environment but when it comes to building I am unable to do so.
>
> I am on macOS -- 10.14.6 and as outlined in the docs and here (https://stackoverflow.com/a/55798942/4521950) I used use 10.9.sdk instead
> of the latest. I have both added this manually using ccmake and also defining it
> like so:
>
> cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
>       -DCMAKE_INSTALL_LIBDIR=lib \
>       -DARROW_FLIGHT=ON \
>       -DARROW_GANDIVA=ON \
>       -DARROW_ORC=ON \
>       -DARROW_PARQUET=ON \
>       -DARROW_PYTHON=ON \
>       -DARROW_PLASMA=ON \
>       -DARROW_BUILD_TESTS=ON \
>       -DCONDA_BUILD_SYSROOT=/opt/MacOSX10.9.sdk \
>       -DARROW_DEPENDENCY_SOURCE=AUTO \
>       ..
>
> But it seems that whatever I try, I seem to get errors, the main only tripping
> me up at the moment is:
>
> -- Building using CMake version: 3.15.3
> -- The C compiler identification is Clang 4.0.1
> -- The CXX compiler identification is Clang 4.0.1
> -- Check for working C compiler: /usr/local/anaconda3/envs/pyarrow-dev/bin/clang
> -- Check for working C compiler: /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -- broken
> CMake Error at /usr/local/anaconda3/envs/pyarrow-dev/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
>   The C compiler
>
>     "/usr/local/anaconda3/envs/pyarrow-dev/bin/clang"
>
>   is not able to compile a simple test program.
>
>   It fails with the following output:
>
>     Change Dir: /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp
>
>     Run Build Command(s):/usr/local/bin/gmake cmTC_b252c/fast && /usr/local/bin/gmake -f CMakeFiles/cmTC_b252c.dir/build.make CMakeFiles/cmTC_b252c.dir/build
>     gmake[1]: Entering directory '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
>     Building C object CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o
>     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang   -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk   -o CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o   -c /Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp/testCCompiler.c
>     Linking C executable cmTC_b252c
>     /usr/local/anaconda3/envs/pyarrow-dev/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b252c.dir/link.txt --verbose=1
>     /usr/local/anaconda3/envs/pyarrow-dev/bin/clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe  -isysroot /opt/MacOSX10.9.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs  CMakeFiles/cmTC_b252c.dir/testCCompiler.c.o  -o cmTC_b252c
>     ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
>     ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
>     clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
>     gmake[1]: *** [CMakeFiles/cmTC_b252c.dir/build.make:87: cmTC_b252c] Error 1
>     gmake[1]: Leaving directory '/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeTmp'
>     gmake: *** [Makefile:121: cmTC_b252c/fast] Error 2
>
>
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:32 (project)
>
> -- Configuring incomplete, errors occurred!
> See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeOutput.log".
> See also "/Users/tallamjr/Github/arrow/cpp/build/CMakeFiles/CMakeError.log".
>
> Does anyone have any insight as to what might be happening and causing this to
> fail. I notice that eventhough I set to CONDA_BUILD_SYSROOT to
> /opt/MacOSX10.9.sdk I also see that ld is looking in MacOSX10.14.sdk, I assume
> that is not right..
>
> I have tried to compare steps with ones outlined in
> https://lists.apache.org/list.html?dev@arrow.apache.org:2019-8 and in other
> corners of the internet but I feel very stuck at the moment.
>
> Any help would be greatly appreciated! Thank you
>