Dan Burkert has submitted this change and it was merged.

Change subject: Fix gmock link errors on macOS
......................................................................


Fix gmock link errors on macOS

For reasons unknown, using 'make install' to install the gmock/gtest
libraries was causing the lib name to be malformed on macOS. For
example, before this change:

```
$ otool -L thirdparty/installed/uninstrumented/lib/libgmock.dylib
thirdparty/installed/uninstrumented/lib/libgmock.dylib:
        libgmock.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
120.0.0)
        /usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 
125.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1213.0.0)
```

and with the change:

```
$ otool -L thirdparty/installed/uninstrumented/lib/libgmock.dylib
thirdparty/installed/uninstrumented/lib/libgmock.dylib:
        
/Users/dan/src/cpp/kudu-gtest/thirdparty/build/gmock-1.7.0.shared/libgmock.dylib
 (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
120.0.0)
        /usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 
125.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 1213.0.0)
```

The result was that tests failed with runtime linker errors:

```
$ bin/index-test
dyld: Library not loaded: libgmock.dylib
  Referenced from: /Users/dan/src/cpp/kudu/build/debug/bin/index-test
    Reason: image not found
    fish: 'and bin/index-test' terminated by signal SIGTRAP (Trace or 
breakpoint trap)
```

I didn't get as far as identifying why the built libraries don't have
the same lib name issue (as opposed to the installed libraries).

Change-Id: I41e6d4bfcabb36efbf83fd4969e9f35c16b74f3d
Reviewed-on: http://gerrit.cloudera.org:8080/7251
Reviewed-by: Alexey Serbin <aser...@cloudera.com>
Reviewed-by: Dan Burkert <danburk...@apache.org>
Tested-by: Dan Burkert <danburk...@apache.org>
---
M thirdparty/build-definitions.sh
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Dan Burkert: Looks good to me, but someone else must approve; Verified
  Alexey Serbin: Looks good to me, approved



-- 
To view, visit http://gerrit.cloudera.org:8080/7251
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I41e6d4bfcabb36efbf83fd4969e9f35c16b74f3d
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>

Reply via email to