You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bryancall (via GitHub)" <gi...@apache.org> on 2023/06/05 23:30:47 UTC

[GitHub] [trafficserver] bryancall opened a new pull request, #9775: cmake: add OPENSSL_ROOT_DIR to rpath to load the correct lib

bryancall opened a new pull request, #9775:
URL: https://github.com/apache/trafficserver/pull/9775

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall commented on pull request #9775: cmake: add OPENSSL_ROOT_DIR to rpath to load the correct lib

Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall commented on PR #9775:
URL: https://github.com/apache/trafficserver/pull/9775#issuecomment-1589692183

   [approve ci autest]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall commented on a diff in pull request #9775: cmake: add OPENSSL_ROOT_DIR to rpath to load the correct lib

Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall commented on code in PR #9775:
URL: https://github.com/apache/trafficserver/pull/9775#discussion_r1228351674


##########
CMakeLists.txt:
##########
@@ -166,11 +165,17 @@ include_directories(
         ${CMAKE_BINARY_DIR}/include
         ${PCRE_INCLUDE_DIRS}
 )
+
 if (OPENSSL_FOUND)
     include_directories(${OPENSSL_INCLUDE_DIR})
     link_libraries(${OPENSSL_CRYPTO_LIBRARY})
 endif(OPENSSL_FOUND)
 
+if (OPENSSL_ROOT_DIR)
+    get_filename_component(OPENSSL_LIBRARY_DIR ${OPENSSL_CRYPTO_LIBRARY} DIRECTORY)
+    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${OPENSSL_LIBRARY_DIR}")
+endif(OPENSSL_ROOT_DIR)
+

Review Comment:
   Yes, that works and simplifies things.  I tested it and works well:
   
   ```
   08:43:26 zeus:(cmake_boringssl_rpath)~/dev/apache/trafficserver$ objdump -x /opt/ats/bin/traffic_server
   ...
     RUNPATH              /opt/ats/lib:/opt/boringssl/lib64
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] JosiahWI commented on a diff in pull request #9775: cmake: add OPENSSL_ROOT_DIR to rpath to load the correct lib

Posted by "JosiahWI (via GitHub)" <gi...@apache.org>.
JosiahWI commented on code in PR #9775:
URL: https://github.com/apache/trafficserver/pull/9775#discussion_r1225337729


##########
CMakeLists.txt:
##########
@@ -166,11 +165,17 @@ include_directories(
         ${CMAKE_BINARY_DIR}/include
         ${PCRE_INCLUDE_DIRS}
 )
+
 if (OPENSSL_FOUND)
     include_directories(${OPENSSL_INCLUDE_DIR})
     link_libraries(${OPENSSL_CRYPTO_LIBRARY})
 endif(OPENSSL_FOUND)
 
+if (OPENSSL_ROOT_DIR)
+    get_filename_component(OPENSSL_LIBRARY_DIR ${OPENSSL_CRYPTO_LIBRARY} DIRECTORY)
+    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${OPENSSL_LIBRARY_DIR}")
+endif(OPENSSL_ROOT_DIR)
+

Review Comment:
   ```suggestion
   set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
   ```
   
   https://cmake.org/cmake/help/v3.26/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.html
   Would this not work?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall commented on pull request #9775: cmake: add OPENSSL_ROOT_DIR to rpath to load the correct lib

Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall commented on PR #9775:
URL: https://github.com/apache/trafficserver/pull/9775#issuecomment-1589691799

   [approve ci autest]
   [approve ci autest]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bryancall merged pull request #9775: cmake: add OPENSSL_ROOT_DIR to rpath to load the correct lib

Posted by "bryancall (via GitHub)" <gi...@apache.org>.
bryancall merged PR #9775:
URL: https://github.com/apache/trafficserver/pull/9775


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org