Build works on my machine now with these changes #242
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before when I tried to build, I would get these errors:
Scanning dependencies of target cogutil
[ 5%] Building C object opencog/util/CMakeFiles/cogutil.dir/backtrace-symbols.c.o
/home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c: In function ‘find_address_in_section’:
/home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c:130:10: warning: implicit declaration of function ‘bfd_get_section_flags’; did you mean ‘bfd_set_section_flags’? [-Wimplicit-function-declaration]
130 | if ((bfd_get_section_flags(abfd) & SEC_ALLOC) == 0) return;
| ^~~~~~~~~~~~~~~~~~~~~
| bfd_set_section_flags
/home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c:132:11: warning: implicit declaration of function ‘bfd_get_section_vma’; did you mean ‘bfd_set_section_vma’? [-Wimplicit-function-declaration]
132 | vma = bfd_get_section_vma(abfd, section);
| ^~~~~~~~~~~~~~~~~~~
| bfd_set_section_vma
/home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c:135:29: warning: passing argument 1 of ‘bfd_section_size’ from incompatible pointer type [-Wincompatible-pointer-types]
135 | size = bfd_section_size(abfd, section);
| ^~~~
| |
| bfd * {aka struct bfd *}
In file included from /home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c:73:
/usr/include/bfd.h:1206:35: note: expected ‘const asection *’ {aka ‘const struct bfd_section *’} but argument is of type ‘bfd *’ {aka ‘struct bfd *’}
1206 | bfd_section_size (const asection *sec)
| ~~~~~~~~~~~~~~~~^~~
/home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c:135:12: error: too many arguments to function ‘bfd_section_size’
135 | size = bfd_section_size(abfd, section);
| ^~~~~~~~~~~~~~~~
In file included from /home/matt/OPENCOG/cogutil/opencog/util/backtrace-symbols.c:73:
/usr/include/bfd.h:1206:1: note: declared here
1206 | bfd_section_size (const asection *sec)
| ^~~~~~~~~~~~~~~~
make[2]: *** [opencog/util/CMakeFiles/cogutil.dir/build.make:76: opencog/util/CMakeFiles/cogutil.dir/backtrace-symbols.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:368: opencog/util/CMakeFiles/cogutil.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
By deleting this lines the build worked with 100% success. Maybe this was just something unique to machine, or there's probably a better solution, so up to you if you want to actually commit the changes.