[ 
https://issues.apache.org/jira/browse/HADOOP-19551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17946433#comment-17946433
 ] 

ASF GitHub Bot commented on HADOOP-19551:
-----------------------------------------

iwasakims opened a new pull request, #7644:
URL: https://github.com/apache/hadoop/pull/7644

   https://issues.apache.org/jira/browse/HADOOP-19551
   
   Building with `-Pnative` by using GCC 14 on Fedora 40 failed due to 
imcompatible changes of GCC.
   
   `-Wno-error=implicit-function-declaration` should be added to CFLAGS in 
order to retain old behavior on GCC >= 14.
   
   ```
   [WARNING] make[2]: *** [CMakeFiles/hadoop_static.dir/build.make:286: 
CMakeFiles/hadoop_static.dir/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c.o]
 Error 1
   [WARNING] make[2]: *** Waiting for unfinished jobs....
   [WARNING] 
/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:
 In function ‘locks_setup’:
   [WARNING] 
/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:250:33:
 error: implicit declaration of function ‘dlsym_CRYPTO_num_locks’; did you mean 
‘dlsym_CRYPTO_malloc’? [-Wimplicit-function-declaration]
   [WARNING]   250 |   lock_cs = dlsym_CRYPTO_malloc(dlsym_CRYPTO_num_locks() * 
 \
   [WARNING]       |                                 ^~~~~~~~~~~~~~~~~~~~~~
   [WARNING]       |                                 dlsym_CRYPTO_malloc
   [WARNING] 
/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:257:3:
 error: implicit declaration of function ‘dlsym_CRYPTO_set_id_callback’; did 
you mean ‘CRYPTO_set_id_callback’? [-Wimplicit-function-declaration]
   [WARNING]   257 |   dlsym_CRYPTO_set_id_callback((unsigned long 
(*)())pthreads_thread_id);
   [WARNING]       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   [WARNING]       |   CRYPTO_set_id_callback
   [WARNING] 
/hadoop/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/random/OpensslSecureRandom.c:258:3:
 error: implicit declaration of function ‘dlsym_CRYPTO_set_locking_callback’; 
did you mean ‘CRYPTO_set_locking_callback’? [-Wimplicit-function-declaration]
   [WARNING]   258 |   dlsym_CRYPTO_set_locking_callback((void 
(*)())pthreads_locking_callback);
   [WARNING]       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   [WARNING]       |   CRYPTO_set_locking_callback
   ```
   
   and [cstdint must be explicitly 
included](https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes) on GCC 
>= 13.
   
   ```
   [WARNING] 
/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/uri.h:60:3:
 error: ‘uint16_t’ does not name a type
   [WARNING]    60 |   uint16_t get_port() const;
   [WARNING]       |   ^~~~~~~~
   [WARNING] 
/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/include/hdfspp/uri.h:25:1:
 note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by 
adding ‘#include <cstdint>’
   [WARNING]    24 | #include <vector>
   [WARNING]   +++ |+#include <cstdint>
   [WARNING]    25 | #include <stdexcept>
   ...
   ```
   




> Fix compilation error of native libraries on newer GCC
> ------------------------------------------------------
>
>                 Key: HADOOP-19551
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19551
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: native
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>            Priority: Major
>
> Building with {{-Pnative}} by using GCC 14 on Fedora 40 failed due to 
> incompatible changes of GCC.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to