kou commented on code in PR #39524:
URL: https://github.com/apache/arrow/pull/39524#discussion_r1445649035


##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -4846,7 +4846,8 @@ macro(build_awssdk)
     set(AWS_LC_C_FLAGS ${EP_C_FLAGS})
     string(APPEND AWS_LC_C_FLAGS " -Wno-error=overlength-strings 
-Wno-error=pedantic")
     # Link time optimization is causing trouble like #34349
-    string(REPLACE "-flto=auto" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
+    # "-flto" and "-flto=10" are added by R with --enable/use-lto see #39523
+    string(REPLACE "-flto[^ ]*" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")

Review Comment:
   Sorry. We need `REGEX`:
   
   ```suggestion
       string(REGEX REPLACE "-flto[^ ]*" "" AWS_LC_C_FLAGS "${AWS_LC_C_FLAGS}")
   ```
   
   But there is another error:
   
   ```text
   ** testing if installed package can be loaded from temporary location
   Error: package or namespace load failed for ‘arrow’ in dyn.load(file, 
DLLpath = DLLpath, ...):
    unable to load shared object 
'/arrow/r/check/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so':
     /arrow/r/check/arrow.Rcheck/00LOCK-arrow/00new/arrow/libs/arrow.so: 
undefined symbol: OPENSSL_free
   ```



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to