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 problems Ubuntu 23.10, gcc 13.2.0 #21

Open
eibach opened this issue Oct 26, 2024 · 3 comments
Open

Build problems Ubuntu 23.10, gcc 13.2.0 #21

eibach opened this issue Oct 26, 2024 · 3 comments

Comments

@eibach
Copy link

eibach commented Oct 26, 2024

I have some problems building on Ubuntu 23.10.

First of all I get an error when running autogen.sh:

checking dependency style of g++... gcc3
./configure: line 16930: syntax error near unexpected token `ext,'
./configure: line 16930: `AX_CXX_COMPILE_STDCXX_14(ext, optional)'

I patched this, but when building I get a lot of errors like:

In file included from src/libdwarf-handles.cpp:14:
include/dwarfpp/abstract-inl.hpp: In member function 'dwarf::core::basic_die* dwarf::core::factory::make_payload(dwarf::core::abstract_die&&, dwarf::core::root_die&)':
include/dwarfpp/abstract-inl.hpp:32:88: error: cannot convert 'dwarf::core::compile_unit_die*' to 'dwarf::core::basic_die*' in return
   32 |                         if (d.tag_here() == DW_TAG_compile_unit) return make_cu_payload(std::move(d), r);
      |                                                                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
      |                                                                                        |
      |                                                                                        dwarf::core::compile_unit_die*
include/dwarfpp/abstract.hpp:37:24: note: class type 'dwarf::core::compile_unit_die' is incomplete
   37 |                 struct compile_unit_die;

I could help cleaning this up, but I would like to see the library in working condition first. Which build environment do you recommend?

@stephenrkell
Copy link
Owner

Hi. Thanks for your interest! Short version: for demo purposes I recommend you try the config that is tested in CI. That is Ubuntu 18.04 which I realise is now rather antiquated, but it should work.

The autoconf thing seems like standard compiler and/or autoconf churn -- if you have the workaround I'd happily take a PR.

For the incomplete type error, I haven't seen that before and it is slightly surprising. If you can add -save-temps to the CXXFLAGS and use that to generate a .ii file for one or more of the affected files, that would help me debug.

The main problem with this library right now is (#12) it needs a major update to the underlying DWARF library API. Without that, it can't deal with DWARF 5 features. The right thing to do is switch to libdw. The newer versions of libdwarf do support DWARF 5 but also have an incompatible API. libdw is just faster and better maintained. I am working on the libdw port so am hoping to get it working in the next week or two, but can't promise just now.

@eibach
Copy link
Author

eibach commented Oct 31, 2024

Hi. Thanks for your interest! Short version: for demo purposes I recommend you try the config that is tested in CI. That is Ubuntu 18.04 which I realise is now rather antiquated, but it should work.

Great, thanks.

The autoconf thing seems like standard compiler and/or autoconf churn -- if you have the workaround I'd happily take a PR.

I took the quick and dirty approach and simply removed the check from the generated configure-script. So nothing to share yet.

For the incomplete type error, I haven't seen that before and it is slightly surprising. If you can add -save-temps to the CXXFLAGS and use that to generate a .ii file for one or more of the affected files, that would help me debug.

I have attached an archive containing the .ii files from my tree.

The main problem with this library right now is (#12) it needs a major update to the underlying DWARF library API. Without that, it can't deal with DWARF 5 features. The right thing to do is switch to libdw. The newer versions of libdwarf do support DWARF 5 but also have an incompatible API. libdw is just faster and better maintained. I am working on the libdw port so am hoping to get it working in the next week or two, but can't promise just now.

Understood. I am working on a Dear ImGui-based tool for examining data structures. For now I am using libdw to get the information from the dwarf data. I was checking if there are already tools that can parse the die attributes. eu-readelf is a terrible reference ...

temps.zip

@stephenrkell
Copy link
Owner

From a quick look, my guess is that the build of include/dwarfpp/dwarf-current-adt.h has failed. Do you have a python2 installed?

It's my bad that this fails so confusingly. I just pushed 006035b which is a mostly untested attempt to prevent this happening in future.

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