Re: Compilation Error on F32
On 30/03/20 11:34 -0600, Nathanael D. Noblet wrote: Hello, I have a project that isn't part of Fedora yet - though really I should add it at this point. Its php-cpp. It allows me to write c++ extensions for PHP. Its worked well for a couple years. I upgraded to F32 beta and now when compiling anything that includes its headers compilation fails and I'm not entirely sure why. g++ -MT pdf-image.o -MMD -MP -MF .d/pdf-image.Td -Wall -g -c -O2 -std=c++11 -fPIC `pkg-config poppler-cpp fontconfig openssl -- cflags`-DVERSION=\"0.11.16\" -c -o pdf-image.o pdf-image.cpp In file included from /usr/include/phpcpp.h:38, from pdf-image.cpp:8: /usr/include/phpcpp/throwable.h:29:1: error: expected class-name before ‘{’ token It's telling you the token before the opening brace is not a class-name. Look at the token. See why GCC thinks it's not a class-name. The most likely reason is it's not been declared (which is exactly what Jakub confirmed, the laborious way of actually checking the preprocessed source). I've attached the header. Any gcc experts out there able to tell me what's wrong with the header format that used to compile but no longer does? It's not a GCC question, it's a C++ one. You didn't include the header for something you're using. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Compilation Error on F32
On 30/03/20 20:55 +0200, Jakub Jelinek wrote: On Mon, Mar 30, 2020 at 07:50:48PM +0200, Jakub Jelinek wrote: On Mon, Mar 30, 2020 at 11:34:15AM -0600, Nathanael D. Noblet wrote: > I have a project that isn't part of Fedora yet - though really I > should add it at this point. Its php-cpp. It allows me to write c++ > extensions for PHP. Its worked well for a couple years. I upgraded to > F32 beta and now when compiling anything that includes its headers > compilation fails and I'm not entirely sure why. > > g++ -MT pdf-image.o -MMD -MP -MF .d/pdf-image.Td -Wall -g -c -O2 > -std=c++11 -fPIC `pkg-config poppler-cpp fontconfig openssl -- > cflags`-DVERSION=\"0.11.16\" -c -o pdf-image.o pdf-image.cpp > In file included from /usr/include/phpcpp.h:38, > from pdf-image.cpp:8: > /usr/include/phpcpp/throwable.h:29:1: error: expected class-name before > ‘{’ token > > I've attached the header. Any gcc experts out there able to tell me > what's wrong with the header format that used to compile but no longer > does? Please mail me a preprocessed source instead (e.g. rerun the g++ command line with -save-temps option and mail pdf-image.ii the compiler creates, or drop -M* options and their arguments, change -c to -E and pdf-image.o to pdf-image.ii). So, from the offlist posted preprocessed source, seems the TU includes the following libstdc++ headers #include #include #include #include #include #include #include and then uses std::runtime_exception. That one is defined in header though, and is not included. Before https://gcc.gnu.org/legacy-ml/libstdc++/2019-06/msg00032.html change it has been included as implementation detail from headers included in , or from the above list. So, you just need to make sure is also included if you need classes from it. Which is documented in the (incomplete) release info for gcc-10: https://gcc.gnu.org/gcc-10/porting_to.html#header-dep-changes ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Compilation Error on F32
On Mon, 2020-03-30 at 13:47 -0600, Nathanael D. Noblet wrote: > Thank you for looking into this for me. Just to be clear, the proper > place to fix this is in the php-cpp project because it is using > std::runtime_exception without including . Is that > correct? Aaaand I just tried it and it works so thanks again! ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Compilation Error on F32
On Mon, 2020-03-30 at 20:55 +0200, Jakub Jelinek wrote: > So, from the offlist posted preprocessed source, seems the TU > includes the > following libstdc++ headers > #include > #include > #include > #include > #include > #include > #include > and then uses std::runtime_exception. That one is defined in > > header though, and is not included. Before > https://gcc.gnu.org/legacy-ml/libstdc++/2019-06/msg00032.html > change it has been included as implementation detail from headers > included > in , or from the above list. > So, you just need to make sure is also included if you > need > classes from it. > Thank you for looking into this for me. Just to be clear, the proper place to fix this is in the php-cpp project because it is using std::runtime_exception without including . Is that correct? Sincerely, -- Nathanael ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Compilation Error on F32
On Mon, Mar 30, 2020 at 07:50:48PM +0200, Jakub Jelinek wrote: > On Mon, Mar 30, 2020 at 11:34:15AM -0600, Nathanael D. Noblet wrote: > > I have a project that isn't part of Fedora yet - though really I > > should add it at this point. Its php-cpp. It allows me to write c++ > > extensions for PHP. Its worked well for a couple years. I upgraded to > > F32 beta and now when compiling anything that includes its headers > > compilation fails and I'm not entirely sure why. > > > > g++ -MT pdf-image.o -MMD -MP -MF .d/pdf-image.Td -Wall -g -c -O2 > > -std=c++11 -fPIC `pkg-config poppler-cpp fontconfig openssl -- > > cflags`-DVERSION=\"0.11.16\" -c -o pdf-image.o pdf-image.cpp > > In file included from /usr/include/phpcpp.h:38, > > from pdf-image.cpp:8: > > /usr/include/phpcpp/throwable.h:29:1: error: expected class-name before > > ‘{’ token > > > > I've attached the header. Any gcc experts out there able to tell me > > what's wrong with the header format that used to compile but no longer > > does? > > Please mail me a preprocessed source instead (e.g. rerun the g++ command > line with -save-temps option and mail pdf-image.ii the compiler creates, > or drop -M* options and their arguments, change -c to -E and pdf-image.o > to pdf-image.ii). So, from the offlist posted preprocessed source, seems the TU includes the following libstdc++ headers #include #include #include #include #include #include #include and then uses std::runtime_exception. That one is defined in header though, and is not included. Before https://gcc.gnu.org/legacy-ml/libstdc++/2019-06/msg00032.html change it has been included as implementation detail from headers included in , or from the above list. So, you just need to make sure is also included if you need classes from it. Jakub ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Compilation Error on F32
On Mon, Mar 30, 2020 at 11:34:15AM -0600, Nathanael D. Noblet wrote: > I have a project that isn't part of Fedora yet - though really I > should add it at this point. Its php-cpp. It allows me to write c++ > extensions for PHP. Its worked well for a couple years. I upgraded to > F32 beta and now when compiling anything that includes its headers > compilation fails and I'm not entirely sure why. > > g++ -MT pdf-image.o -MMD -MP -MF .d/pdf-image.Td -Wall -g -c -O2 > -std=c++11 -fPIC `pkg-config poppler-cpp fontconfig openssl -- > cflags`-DVERSION=\"0.11.16\" -c -o pdf-image.o pdf-image.cpp > In file included from /usr/include/phpcpp.h:38, > from pdf-image.cpp:8: > /usr/include/phpcpp/throwable.h:29:1: error: expected class-name before > ‘{’ token > > I've attached the header. Any gcc experts out there able to tell me > what's wrong with the header format that used to compile but no longer > does? Please mail me a preprocessed source instead (e.g. rerun the g++ command line with -save-temps option and mail pdf-image.ii the compiler creates, or drop -M* options and their arguments, change -c to -E and pdf-image.o to pdf-image.ii). Thanks. Jakub ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org