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

Build problem with gcc-10.2 (Beyond Linux From Scratch 10.0) built on LFS-10.0) #4

Open
DrHarlan opened this issue Jan 20, 2021 · 1 comment

Comments

@DrHarlan
Copy link

The make output for ptlib-master is attached. Gcc is 10.2.0 and the problem seems to come when an openssl include file, ossl_typ.h, is used. I'm not very knowledgable in C++, but it may be that openssl is contributing to this.
ptlib-build.txt
If you need any additional info let me know.

@mwberry
Copy link

mwberry commented Dec 11, 2022

As far as I can tell, this package is written to compile against OpenSSL 1.0, which is very old. Your linux distribution may or may not have it available as a package. If it does, it may or may not be in the location that the compiler is looking for it.

I found that I had to explicitly point pkgconf at OpenSSL 1.0 to get past these errors:

$ PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig pkg-config --path openssl
/usr/lib/openssl-1.0/pkgconfig/openssl.pc
$ PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig pkg-config --cflags --libs openssl
-I/usr/include/openssl-1.0 -L/usr/lib/openssl-1.0 -lssl -lcrypto 
$ PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig:/usr/lib/pkgconfig ./configure

However that only gets me to the next compile error.

...
+ g++ -I/root/ptlib/include -DP_64BIT -DPTRACING=1 -D_REENTRANT -I/usr/include/openssl-1.0 -fno-exceptions -Wall -Wformat -Wfo
rmat-security -D_FORTIFY_SOURCE=2 -DP_64BIT -fPIC -DPIC -DNDEBUG -Os -felide-constructors -Wreorder -c ptlib/unix/svcproc.cxx 
-o /root/ptlib/lib_linux_x86_64/obj/svcproc.o
...
ptlib/unix/svcproc.cxx:387:33: error: call of overloaded ‘basic_ifstream(PString&)’ is ambiguous
  387 |     ifstream pidfile(pidfilename);
      |                                 ^
/usr/include/c++/12.2.0/fstream:567:7: note: candidate: ‘std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const std::string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::ios_base::openmode]’
  567 |       basic_ifstream(const std::string& __s,
      |       ^~~~~~~~~~~~~~
/usr/include/c++/12.2.0/fstream:534:7: note: candidate: ‘std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::ios_base::openmode]’
  534 |       basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
      |       ^~~~~~~~~~~~~~

This is on:

commit 27b403a0e0928c3bd83810a7b9b00ea08308d6a2 (HEAD -> master, tag: v2.10.15, origin/master, origin/HEAD)
Author: Pete Davidson <[email protected]>
Date:   Thu May 26 20:00:46 2016 -0400

    Version 2.10.15

On a system with glibc 2.36 and gcc 12.2.0.

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