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

Compile error: namespace does not have a type #22

Closed
depate opened this issue Jun 2, 2021 · 3 comments
Closed

Compile error: namespace does not have a type #22

depate opened this issue Jun 2, 2021 · 3 comments

Comments

@depate
Copy link

depate commented Jun 2, 2021

While building this subproject for service-config-manager this error occured:

FAILED: subprojects/phosphor-logging/phosphor-rsyslog-config/phosphor-rsyslog-conf.p/meson-generated_.._.._elog-process-metadata.cpp.o
ccache c++ -Isubprojects/phosphor-logging/phosphor-rsyslog-config/phosphor-rsyslog-conf.p -Isubprojects/phosphor-logging/phosphor-rsyslog-config -I../subprojects/phosphor-logging/phosphor-rsyslog-config -Isubprojects/phosphor-logging -I../subprojects/phosphor-logging -Isubprojects/phosphor-dbus-interfaces/gen -I../subprojects/phosphor-dbus-interfaces/gen -I../subprojects/sdbusplus/include -Isubprojects/sdeventplus/src -I../subprojects/sdeventplus/src -Isubprojects/stdplus/src -I../subprojects/stdplus/src -I../subprojects/span-lite/include -Isubprojects/span-lite/__CMake_build -I../subprojects/span-lite/__CMake_build -Isubprojects/span-lite -I../subprojects/span-lite -I../subprojects/function2/include -Isubprojects/function2/__CMake_build -I../subprojects/function2/__CMake_build -Isubprojects/function2 -I../subprojects/function2 -Isubprojects/phosphor-logging/phosphor-logging -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Wpedantic -Werror -std=c++17 -g -MD -MQ subprojects/phosphor-logging/phosphor-rsyslog-config/phosphor-rsyslog-conf.p/meson-generated_.._.._elog-process-metadata.cpp.o -MF subprojects/phosphor-logging/phosphor-rsyslog-config/phosphor-rsyslog-conf.p/meson-generated_.._.._elog-process-metadata.cpp.o.d -o subprojects/phosphor-logging/phosphor-rsyslog-config/phosphor-rsyslog-conf.p/meson-generated_.._.._elog-process-metadata.cpp.o -c subprojects/phosphor-logging/elog-process-metadata.cpp
In file included from subprojects/phosphor-logging/elog-process-metadata.cpp:7:
subprojects/phosphor-logging/phosphor-logging/elog-errors.hpp:2408:31: error: 'example' in namespace 'phosphor::logging::subprojects' does not name a type
 2408 |     using type = subprojects::example::net::poettering::Calculator::DivisionByZero;
      |                               ^~~~~~~
subprojects/phosphor-logging/phosphor-logging/elog-errors.hpp:2452:31: error: 'example' in namespace 'phosphor::logging::subprojects' does not name a type
 2452 |     using type = subprojects::example::net::poettering::Calculator::PermissionDenied;
      |                               ^~~~~~~

GCC

> gcc --version
gcc (GCC) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@williamspatrick
Copy link
Member

I think @wak-google is fixing this in phosphor-dbus-interfaces.

@wak-google
Copy link
Contributor

bradbishop pushed a commit to openbmc/service-config-manager that referenced this issue Nov 15, 2021
This commit enables the isolated build of this repository with meson.
This contribution was made possible by Patrick's [blog post][1].

Building standalone with `meson setup builddir && ninja -C builddir`
worked up to the point when `phosphor-logging` raised an
[error][2]. So I cannot state that it is fully tested, but setting up
the `builddir` correctly should've been half the way.

[1]: http://www.stwcx.xyz/blog/2021/04/18/meson-subprojects.html
[2]: openbmc/phosphor-logging#22

Signed-off-by: Patrik Tesarik <patrik.tesarik@rub.de>
Change-Id: I8ce6c9292edbb6d72414edd8794c337f30bc0734
@williamspatrick
Copy link
Member

I believe this is resolved.

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

3 participants