Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phonenum: cannot build on Fedora 39 #3659

Closed
sergey-safarov opened this issue Nov 28, 2023 · 3 comments
Closed

phonenum: cannot build on Fedora 39 #3659

sergey-safarov opened this issue Nov 28, 2023 · 3 comments

Comments

@sergey-safarov
Copy link
Member

LD (gcc) [M db_perlvdb.so]		db_perlvdb.so
CC (gcc) [M phonenum.so]		phonenum_mod.o
CC (gcc) [M phonenum.so]		phonenum_pv.o
Compiling cphonenumber.cpp
g++ -std=c++11 -fPIC -DPIC -g -funroll-loops -Wcast-align -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wno-write-strings -Wno-deprecated -Wno-unused-function -Wno-sign-compare -Wno-strict-aliasing -fPIC -DPIC -g -funroll-loops -Wcast-align -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall  -DNAME='"kamailio"' -DVERSION='"5.7.2"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 13.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5007002 -DCFG_DIR='"/etc/kamailio/"' -DSHARE_DIR='"/usr/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_NAPTR -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKAROUND -DUSE_FUTEX -DHAVE_SELECT  -I/usr/local/include -DMOD_NAME='"phonenum"' -c cphonenumber.cpp -o cphonenumber.o
In file included from /usr/include/absl/base/config.h:86,
                 from /usr/include/absl/base/const_init.h:25,
                 from /usr/include/absl/synchronization/mutex.h:67,
                 from /usr/include/phonenumbers/geocoding/phonenumber_offline_geocoder.h:24,
                 from cphonenumber.cpp:24:
/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
   79 | #error "C++ versions less than C++14 are not supported."
      |  ^~~~~
In file included from /usr/include/absl/time/time.h:89,
                 from /usr/include/absl/time/clock.h:26,
                 from /usr/include/absl/synchronization/internal/kernel_timeout.h:30,
                 from /usr/include/absl/synchronization/mutex.h:74:
/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type
   52 | using string_view = std::string_view;
      |                          ^~~~~~~~~~~
/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards
   52 | using string_view = std::string_view;
      |                     ^~~
/usr/include/absl/strings/string_view.h:686:8: error: ‘string_view’ does not name a type
  686 | inline string_view ClippedSubstr(string_view s, size_t pos,
      |        ^~~~~~~~~~~
/usr/include/absl/strings/string_view.h:697:11: error: ‘string_view’ does not name a type
  697 | constexpr string_view NullSafeStringView(const char* p) {
      |           ^~~~~~~~~~~
In file included from /usr/include/absl/time/time.h:90:
/usr/include/absl/time/civil_time.h:489:27: error: ‘string_view’ is not a member of ‘absl’
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |                           ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:489:53: error: expected primary-expression before ‘*’ token
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |                                                     ^
/usr/include/absl/time/civil_time.h:489:55: error: ‘c’ was not declared in this scope
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |                                                       ^
/usr/include/absl/time/civil_time.h:489:56: error: expression list treated as compound expression in initializer [-fpermissive]
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |                                                        ^
/usr/include/absl/time/civil_time.h:490:6: error: redefinition of ‘bool absl::lts_20230802::ParseCivilTime’
  490 | bool ParseCivilTime(absl::string_view s, CivilMinute* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:489:6: note: ‘bool absl::lts_20230802::ParseCivilTime’ previously defined here
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:490:27: error: ‘string_view’ is not a member of ‘absl’
  490 | bool ParseCivilTime(absl::string_view s, CivilMinute* c);
      |                           ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:490:53: error: expected primary-expression before ‘*’ token
  490 | bool ParseCivilTime(absl::string_view s, CivilMinute* c);
      |                                                     ^
/usr/include/absl/time/civil_time.h:490:55: error: ‘c’ was not declared in this scope
  490 | bool ParseCivilTime(absl::string_view s, CivilMinute* c);
      |                                                       ^
/usr/include/absl/time/civil_time.h:491:6: error: redefinition of ‘bool absl::lts_20230802::ParseCivilTime’
  491 | bool ParseCivilTime(absl::string_view s, CivilHour* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:489:6: note: ‘bool absl::lts_20230802::ParseCivilTime’ previously defined here
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:491:27: error: ‘string_view’ is not a member of ‘absl’
  491 | bool ParseCivilTime(absl::string_view s, CivilHour* c);
      |                           ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:491:51: error: expected primary-expression before ‘*’ token
  491 | bool ParseCivilTime(absl::string_view s, CivilHour* c);
      |                                                   ^
/usr/include/absl/time/civil_time.h:491:53: error: ‘c’ was not declared in this scope
  491 | bool ParseCivilTime(absl::string_view s, CivilHour* c);
      |                                                     ^
/usr/include/absl/time/civil_time.h:492:6: error: redefinition of ‘bool absl::lts_20230802::ParseCivilTime’
  492 | bool ParseCivilTime(absl::string_view s, CivilDay* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:489:6: note: ‘bool absl::lts_20230802::ParseCivilTime’ previously defined here
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:492:27: error: ‘string_view’ is not a member of ‘absl’
  492 | bool ParseCivilTime(absl::string_view s, CivilDay* c);
      |                           ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:492:50: error: expected primary-expression before ‘*’ token
  492 | bool ParseCivilTime(absl::string_view s, CivilDay* c);
      |                                                  ^
/usr/include/absl/time/civil_time.h:492:52: error: ‘c’ was not declared in this scope
  492 | bool ParseCivilTime(absl::string_view s, CivilDay* c);
      |                                                    ^
/usr/include/absl/time/civil_time.h:493:6: error: redefinition of ‘bool absl::lts_20230802::ParseCivilTime’
  493 | bool ParseCivilTime(absl::string_view s, CivilMonth* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:489:6: note: ‘bool absl::lts_20230802::ParseCivilTime’ previously defined here
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:493:27: error: ‘string_view’ is not a member of ‘absl’
  493 | bool ParseCivilTime(absl::string_view s, CivilMonth* c);
      |                           ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:493:52: error: expected primary-expression before ‘*’ token
  493 | bool ParseCivilTime(absl::string_view s, CivilMonth* c);
      |                                                    ^
/usr/include/absl/time/civil_time.h:493:54: error: ‘c’ was not declared in this scope
  493 | bool ParseCivilTime(absl::string_view s, CivilMonth* c);
      |                                                      ^
/usr/include/absl/time/civil_time.h:494:6: error: redefinition of ‘bool absl::lts_20230802::ParseCivilTime’
  494 | bool ParseCivilTime(absl::string_view s, CivilYear* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:489:6: note: ‘bool absl::lts_20230802::ParseCivilTime’ previously defined here
  489 | bool ParseCivilTime(absl::string_view s, CivilSecond* c);
      |      ^~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:494:27: error: ‘string_view’ is not a member of ‘absl’
  494 | bool ParseCivilTime(absl::string_view s, CivilYear* c);
      |                           ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:494:51: error: expected primary-expression before ‘*’ token
  494 | bool ParseCivilTime(absl::string_view s, CivilYear* c);
      |                                                   ^
/usr/include/absl/time/civil_time.h:494:53: error: ‘c’ was not declared in this scope
  494 | bool ParseCivilTime(absl::string_view s, CivilYear* c);
      |                                                     ^
/usr/include/absl/time/civil_time.h:509:34: error: ‘string_view’ is not a member of ‘absl’
  509 | bool ParseLenientCivilTime(absl::string_view s, CivilSecond* c);
      |                                  ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:509:60: error: expected primary-expression before ‘*’ token
  509 | bool ParseLenientCivilTime(absl::string_view s, CivilSecond* c);
      |                                                            ^
/usr/include/absl/time/civil_time.h:509:62: error: ‘c’ was not declared in this scope
  509 | bool ParseLenientCivilTime(absl::string_view s, CivilSecond* c);
      |                                                              ^
/usr/include/absl/time/civil_time.h:509:63: error: expression list treated as compound expression in initializer [-fpermissive]
  509 | bool ParseLenientCivilTime(absl::string_view s, CivilSecond* c);
      |                                                               ^
/usr/include/absl/time/civil_time.h:510:6: error: redefinition of ‘bool absl::lts_20230802::ParseLenientCivilTime’
  510 | bool ParseLenientCivilTime(absl::string_view s, CivilMinute* c);
      |      ^~~~~~~~~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:509:6: note: ‘bool absl::lts_20230802::ParseLenientCivilTime’ previously defined here
  509 | bool ParseLenientCivilTime(absl::string_view s, CivilSecond* c);
      |      ^~~~~~~~~~~~~~~~~~~~~
/usr/include/absl/time/civil_time.h:510:34: error: ‘string_view’ is not a member of ‘absl’
  510 | bool ParseLenientCivilTime(absl::string_view s, CivilMinute* c);
      |                                  ^~~~~~~~~~~
/usr/include/absl/time/civil_time.h:510:60: error: expected primary-expression before ‘*’ token
  510 | bool ParseLenientCivilTime(absl::string_view s, CivilMinute* c);
      |                                                            ^

Full log in the attached file
phonenum-build.log

@sergey-safarov
Copy link
Member Author

Created related issue
abseil/abseil-cpp#1578

@sergey-safarov
Copy link
Member Author

To fix the module build on the Fedora 39 required to make this change

diff --git a/src/modules/phonenum/Makefile b/src/modules/phonenum/Makefile
index f465226a97..16e21d902e 100644
--- a/src/modules/phonenum/Makefile
+++ b/src/modules/phonenum/Makefile
@@ -18,7 +18,7 @@ include ../../Makefile.modules
 
 cphonenumber.o: cphonenumber.cpp cphonenumber.h
        @echo "Compiling $<"
-       $(CXX) -std=c++11 $(CXXFLAGS) $(CFLAGS) $(C_DEFS) $(DEFS) -c $< -o $@
+       $(CXX) -std=c++17 $(CXXFLAGS) $(CFLAGS) $(C_DEFS) $(DEFS) -c $< -o $@
 
 phonenum.so: cphonenumber.o
 

miconda added a commit that referenced this issue Dec 5, 2023
- can be set via option CSTDVER
- defaults now to c++17
- GH #3659
@miconda
Copy link
Member

miconda commented Dec 5, 2023

Thanks! I pushed a slightly different patch to allow easier set of the C standard via CLI options.

@miconda miconda closed this as completed Dec 5, 2023
sergey-safarov pushed a commit to sergey-safarov/kamailio that referenced this issue Mar 28, 2024
- can be set via option CSTDVER
- defaults now to c++17
- GH kamailio#3659
linuxmaniac pushed a commit that referenced this issue May 4, 2024
- can be set via option CSTDVER
- defaults now to c++17
- GH #3659

(cherry picked from commit 6dd5598)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants