You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Sebastian Höffner <in...@sebastian-hoeffner.de> on 2020/10/03 10:04:23 UTC

Building libhdfs.dylib on macOS

Dear Hadoop Team,

I am currently trying to build libhdfs.dylib on my macOS as dvc requires it
to talk to hdfs servers.
Unfortunately, the homebrew version of hadoop comes without natives, so
installing hadoop via brew does not work.

Thus, I endeavored on a quest to build libhdfs.dylib from source. You can
find some more details in [1], but the long story short is:
- I cannot build 3.1.0 as it requires libprotoc 2.5.0
- I cannot build 3.3.0, even after removing -html4 and disabling doclint
for javadocs
- I cannot build the trunk (18fa4397e6d), even after removing -html4 and
disabling doclint for javadocs
I manually installed protobuf as required per BUILDING.txt, but I do use
java sdk 14.0.1 instead of 8.

I tried building hadoop-hdfs-project individually, after installing the
required hadoop-maven-plugins module, but it still requires hadoop-kms
which I don't know where to compile from.
Thus I resorted to building everything.
Currently I am stuck at

    [WARNING]
/Users/shoeffner/Projects/dlu_test/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/runc/runc_reap.c:24:10:
fatal error: 'mntent.h' file not found
    [WARNING] #include <mntent.h>
    [WARNING]          ^~~~~~~~~~
    [WARNING] 1 error generated.
    [WARNING] 1 error generated.
    [WARNING] make[2]: ***
[CMakeFiles/container.dir/main/native/container-executor/impl/runc/runc_reap.c.o]
Error 1

mntent.h seems to be part of Glibc, but I do have gcc installed so I wonder
why it's missing.

Do you have any ideas on how I can proceed?
Related tickets are [2]-[5].

Thank you very much,
Sebastian Höffner

[1]: https://github.com/iterative/dvc/issues/4656
[2]: https://issues.apache.org/jira/browse/YARN-8622
[3]: https://issues.apache.org/jira/browse/YARN-9487
[4]: https://issues.apache.org/jira/browse/HADOOP-16263
[5]: https://issues.apache.org/jira/browse/HADOOP-17178.