[jira] [Commented] (HAWQ-513) initdb.c failed on OSX 10.11.3 due to fgets error
[ https://issues.apache.org/jira/browse/HAWQ-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15650385#comment-15650385 ] Hongxu Ma commented on HAWQ-513: I had the same problems on osx 10.11.16, and solved it by this: enter the mac "Recovery Mode", and set csrutil disable. more detail in: https://cwiki.apache.org/confluence/display/HAWQ/Build+and+Install see the "Turning Off Rootless System Integrity Protection in OS X El Capitan 10.11+" section. after do that, the "DYLD_LIBRARY_PATH" can work well, that's the key to cause of this problem. Try it. > initdb.c failed on OSX 10.11.3 due to fgets error > - > > Key: HAWQ-513 > URL: https://issues.apache.org/jira/browse/HAWQ-513 > Project: Apache HAWQ > Issue Type: Bug > Components: Unknown >Reporter: xin zhang >Assignee: Lei Chang > Fix For: backlog > > > we hit following strange issue on OSX 10.11.3: > The error message in the initdb is: > {code} > 20160301:00:00:26:075823 hawq_init:This-MacBook-Pro:vagrant-[INFO]:-Start to > init master node: 'localhost' > sh: line 1: 76106 Trace/BPT trap: 5 "/usr/local/hawq/bin/postgres" -V > 2> /dev/null > fgets failure: Undefined error: 0 > The program "postgres" is needed by initdb but was either not found in the > same directory as "/usr/local/hawq/bin/initdb" or failed unexpectedly. > Check your installation; "postgres -V" may have more information. > Master postgres initdb failed > {code} > We suspect the issue due to the newer version of the libSystem.B.dylib on OSX > 10.11.3. > Here is the details of the dependencies of `postgres` and `initdb`: > 10.10.5, postgres can start, and initdb succeed: > {code} > [bin: xzhang{master}]$ otool -L postgres > postgres: > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 120.0.0) > libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30) > /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version > 10.9.0) > libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13) > /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, > current version 3.1.0) > /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, > current version 5.0.0) > /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version > 1.0.5) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1213.0.0) > /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version > 8.0.0) > /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos > (compatibility version 5.0.0, current version 6.0.0) > libdxltranslators.dylib (compatibility version 0.0.0, current version > 0.0.0) > /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version > 0.0.0, current version 0.0.0) > This-MacBook-Pro:bin vagrant$ otool -L initdb > initdb: > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1226.10.1) > {code} > 10.11.3, postgres can start, but initdb failed: > {code} > This-MacBook-Pro:bin vagrant$ otool -L postgres > postgres: > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 120.1.0) > libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30) > /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version > 10.9.0) > libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13) > /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, > current version 3.1.0) > /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, > current version 5.0.0) > /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version > 1.0.5) > /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version > 0.9.8) > /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current > version 0.9.8) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1226.10.1) > /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version > 8.0.0) > /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos > (compatibility version 5.0.0, current version 6.0.0) > libdxltranslators.dylib (compatibility version 0.0.0, current version > 0.0.0) > /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version > 0.0.0, current version 0.0.0) > [bin: xzhang{master}]$ otool -L initdb > initdb: > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1213.0.0) > {code} > In this case, there is a
[jira] [Commented] (HAWQ-513) initdb.c failed on OSX 10.11.3 due to fgets error
[ https://issues.apache.org/jira/browse/HAWQ-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15650441#comment-15650441 ] hongwu commented on HAWQ-513: - Yes, I think after OSX 10.11, the environment variable `DYLD_LIBRARY_PATH` is closed unless users reset in recovery mode. Thanks [~hongxu ma] for detailing this. :beer > initdb.c failed on OSX 10.11.3 due to fgets error > - > > Key: HAWQ-513 > URL: https://issues.apache.org/jira/browse/HAWQ-513 > Project: Apache HAWQ > Issue Type: Bug > Components: Unknown >Reporter: xin zhang >Assignee: Lei Chang > Fix For: backlog > > > we hit following strange issue on OSX 10.11.3: > The error message in the initdb is: > {code} > 20160301:00:00:26:075823 hawq_init:This-MacBook-Pro:vagrant-[INFO]:-Start to > init master node: 'localhost' > sh: line 1: 76106 Trace/BPT trap: 5 "/usr/local/hawq/bin/postgres" -V > 2> /dev/null > fgets failure: Undefined error: 0 > The program "postgres" is needed by initdb but was either not found in the > same directory as "/usr/local/hawq/bin/initdb" or failed unexpectedly. > Check your installation; "postgres -V" may have more information. > Master postgres initdb failed > {code} > We suspect the issue due to the newer version of the libSystem.B.dylib on OSX > 10.11.3. > Here is the details of the dependencies of `postgres` and `initdb`: > 10.10.5, postgres can start, and initdb succeed: > {code} > [bin: xzhang{master}]$ otool -L postgres > postgres: > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 120.0.0) > libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30) > /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version > 10.9.0) > libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13) > /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, > current version 3.1.0) > /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, > current version 5.0.0) > /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version > 1.0.5) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1213.0.0) > /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version > 8.0.0) > /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos > (compatibility version 5.0.0, current version 6.0.0) > libdxltranslators.dylib (compatibility version 0.0.0, current version > 0.0.0) > /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version > 0.0.0, current version 0.0.0) > This-MacBook-Pro:bin vagrant$ otool -L initdb > initdb: > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1226.10.1) > {code} > 10.11.3, postgres can start, but initdb failed: > {code} > This-MacBook-Pro:bin vagrant$ otool -L postgres > postgres: > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 120.1.0) > libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30) > /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version > 10.9.0) > libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13) > /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, > current version 3.1.0) > /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, > current version 5.0.0) > /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version > 1.0.5) > /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version > 0.9.8) > /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current > version 0.9.8) > /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1226.10.1) > /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version > 8.0.0) > /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos > (compatibility version 5.0.0, current version 6.0.0) > libdxltranslators.dylib (compatibility version 0.0.0, current version > 0.0.0) > /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version > 0.0.0, current version 0.0.0) > [bin: xzhang{master}]$ otool -L initdb > initdb: > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1213.0.0) > {code} > In this case, there is a difference between the two OS regarding to the > libSystem.B.dylib. > Question is how to fix it? For example, how to change the libSystem.B.dylib > to an older version? or, how to fix the postgres or initdb so that they works > on the new OS