Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#13382 closed bug (fixed)

Haiku build fails under host gcc 7.0.1 due to agg base_type

Reported by: kallisti5 Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Servers/app_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description (last modified by kallisti5)

hrev51023 x86_64 build.

Fedora 26, x86_64

++ /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/build/libbe/icon/FlatIconImporter.o 
In file included from /home/kallisti5/Code/haiku/src/libs/icon/./IconRenderer.h:18:0,
                 from /home/kallisti5/Code/haiku/src/libs/icon/style/Style.h:18,
                 from /home/kallisti5/Code/haiku/src/libs/icon/flat_icon/FlatIconImporter.cpp:30:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h: In constructor ‘agg::scanline32_u8_am<AlphaMask>::scanline32_u8_am()’:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:469:10: error: invalid use of ‘agg::scanline32_u8_am<AlphaMask>::base_type’
    this->base_type();
          ^~~~~~~~~
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h: In constructor ‘agg::scanline32_u8_am<AlphaMask>::scanline32_u8_am(const AlphaMask&)’:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:474:10: error: invalid use of ‘agg::scanline32_u8_am<AlphaMask>::base_type’
    this->base_type();
          ^~~~~~~~~

cc -c "/home/kallisti5/Code/haiku/src/libs/icon/flat_icon/FlatIconImporter.cpp" -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -fPIC -include BeOSBuildCompatibility.h -DARCH_x86_64 -D_NO_INLINE_ASM -D__x86_64__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_PLATFORM_LINUX -DHAIKU_HOST_PLATFORM_64_BIT -DHAIKU_PACKAGING_ARCH=\"x86_64\" -iquote /home/kallisti5/Code/haiku/build/user_config_headers -iquote /home/kallisti5/Code/haiku/build/config_headers -iquote /home/kallisti5/Code/haiku/src/build/libbe/icon -iquote /home/kallisti5/Code/haiku/generated.x86_64/objects/common/build/libbe/icon -iquote /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/common/build/libbe/icon -iquote /home/kallisti5/Code/haiku/generated.x86_64/objects/haiku/x86_64/common/build/libbe/icon -iquote /home/kallisti5/Code/haiku/src/libs/icon/. -iquote /home/kallisti5/Code/haiku/src/libs/icon/flat_icon -iquote /home/kallisti5/Code/haiku/src/libs/icon/message -iquote /home/kallisti5/Code/haiku/src/libs/icon/shape -iquote /home/kallisti5/Code/haiku/src/libs/icon/style -iquote /home/kallisti5/Code/haiku/src/libs/icon/transformable -iquote /home/kallisti5/Code/haiku/src/libs/icon/transformer -iquote /home/kallisti5/Code/haiku/src/libs/agg/src -I /home/kallisti5/Code/haiku/headers/libs/agg -I /home/kallisti5/Code/haiku/headers/libs/icon -I /home/kallisti5/Code/haiku/headers/build/private/shared -I /home/kallisti5/Code/haiku/headers/build/host/linux -I /home/kallisti5/Code/haiku/headers/build -I /home/kallisti5/Code/haiku/headers/build/os -I /home/kallisti5/Code/haiku/headers/build/os/add-ons/registrar -I /home/kallisti5/Code/haiku/headers/build/os/app -I /home/kallisti5/Code/haiku/headers/build/os/bluetooth -I /home/kallisti5/Code/haiku/headers/build/os/drivers -I /home/kallisti5/Code/haiku/headers/build/os/kernel -I /home/kallisti5/Code/haiku/headers/build/os/interface -I /home/kallisti5/Code/haiku/headers/build/os/locale -I /home/kallisti5/Code/haiku/headers/build/os/storage -I /home/kallisti5/Code/haiku/headers/build/os/support -I /home/kallisti5/Code/haiku/headers/build/private -o "/home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/build/libbe/icon/FlatIconImporter.o" ;

...failed C++ /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/build/libbe/icon/FlatIconImporter.o ...

BUILD FAILURE:
...failed updating 1 target(s)...
...skipped 12 target(s)...

Change History (8)

comment:1 Changed 2 years ago by kallisti5

Description: modified (diff)

comment:2 Changed 2 years ago by kallisti5

Summary: Haiku build fails under host gcc 7.0.1Haiku build fails under host gcc 7.0.1 due to agg base_type

comment:3 Changed 2 years ago by waddlesplash

Component: Build SystemServers/app_server
Owner: changed from bonefish to axeld

Does it really? AFAICT the only possibly related commit in there *fixed* an error on GCC6.

(moving to app_server component; agg doesn't seem to have its own)

comment:4 Changed 2 years ago by kallisti5

I reverted 58916d4a365d68ddfebaa75d08d083a67350e880 and the issue got slightly worse... so 58916d4a365d68ddfebaa75d08d083a67350e880 is definitely a good fix. Just didn't go far enough to satisfy gcc 7

InitScript1 /home/kallisti5/Code/haiku/generated.x86_64/haiku.image-init-vars 
C++ /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/tools/addattr/main.o 
C++ /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/tools/addattr/addAttr.o 
C++ /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/build/libbe/icon/FlatIconImporter.o 
In file included from /home/kallisti5/Code/haiku/src/libs/icon/./IconRenderer.h:18:0,
                 from /home/kallisti5/Code/haiku/src/libs/icon/style/Style.h:18,
                 from /home/kallisti5/Code/haiku/src/libs/icon/flat_icon/FlatIconImporter.cpp:30:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h: In constructor ‘agg::scanline32_u8_am<AlphaMask>::scanline32_u8_am()’:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:469:10: error: invalid use of ‘agg::scanline32_u8_am<AlphaMask>::base_type’
    this->base_type();
          ^~~~~~~~~
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h: In constructor ‘agg::scanline32_u8_am<AlphaMask>::scanline32_u8_am(const AlphaMask&)’:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:474:10: error: invalid use of ‘agg::scanline32_u8_am<AlphaMask>::base_type’
    this->base_type();
          ^~~~~~~~~
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h: In member function ‘void agg::scanline32_u8_am<AlphaMask>::finalize(int)’:
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:480:30: error: ‘agg::scanline32_u8_am<AlphaMask>::base_type {aka agg::scanline_u8}’ is not a base of ‘agg::scanline32_u8_am<AlphaMask>’
             this->base_type::finalize(span_y);
                              ^~~~~~~~
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:483:70: error: ‘agg::scanline32_u8_am<AlphaMask>::base_type {aka agg::scanline_u8}’ is not a base of ‘agg::scanline32_u8_am<AlphaMask>’
                 typename base_type::iterator span = this->base_type::begin();
                                                                      ^~~~~
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:484:51: error: ‘agg::scanline32_u8_am<AlphaMask>::base_type {aka agg::scanline_u8}’ is not a base of ‘agg::scanline32_u8_am<AlphaMask>’
                 unsigned count = this->base_type::num_spans();
                                                   ^~~~~~~~~
/home/kallisti5/Code/haiku/headers/libs/agg/agg_scanline_u.h:488:66: error: ‘agg::scanline32_u8_am<AlphaMask>::base_type {aka agg::scanline_u8}’ is not a base of ‘agg::scanline32_u8_am<AlphaMask>’
                                                 this->base_type::y(),
                                                                  ^

cc -c "/home/kallisti5/Code/haiku/src/libs/icon/flat_icon/FlatIconImporter.cpp" -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -fPIC -include BeOSBuildCompatibility.h -DARCH_x86_64 -D_NO_INLINE_ASM -D__x86_64__ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_PLATFORM_LINUX -DHAIKU_HOST_PLATFORM_64_BIT -DHAIKU_PACKAGING_ARCH=\"x86_64\" -iquote /home/kallisti5/Code/haiku/build/user_config_headers -iquote /home/kallisti5/Code/haiku/build/config_headers -iquote /home/kallisti5/Code/haiku/src/build/libbe/icon -iquote /home/kallisti5/Code/haiku/generated.x86_64/objects/common/build/libbe/icon -iquote /home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/common/build/libbe/icon -iquote /home/kallisti5/Code/haiku/generated.x86_64/objects/haiku/x86_64/common/build/libbe/icon -iquote /home/kallisti5/Code/haiku/src/libs/icon/. -iquote /home/kallisti5/Code/haiku/src/libs/icon/flat_icon -iquote /home/kallisti5/Code/haiku/src/libs/icon/message -iquote /home/kallisti5/Code/haiku/src/libs/icon/shape -iquote /home/kallisti5/Code/haiku/src/libs/icon/style -iquote /home/kallisti5/Code/haiku/src/libs/icon/transformable -iquote /home/kallisti5/Code/haiku/src/libs/icon/transformer -iquote /home/kallisti5/Code/haiku/src/libs/agg/src -I /home/kallisti5/Code/haiku/headers/libs/agg -I /home/kallisti5/Code/haiku/headers/libs/icon -I /home/kallisti5/Code/haiku/headers/build/private/shared -I /home/kallisti5/Code/haiku/headers/build/host/linux -I /home/kallisti5/Code/haiku/headers/build -I /home/kallisti5/Code/haiku/headers/build/os -I /home/kallisti5/Code/haiku/headers/build/os/add-ons/registrar -I /home/kallisti5/Code/haiku/headers/build/os/app -I /home/kallisti5/Code/haiku/headers/build/os/bluetooth -I /home/kallisti5/Code/haiku/headers/build/os/drivers -I /home/kallisti5/Code/haiku/headers/build/os/kernel -I /home/kallisti5/Code/haiku/headers/build/os/interface -I /home/kallisti5/Code/haiku/headers/build/os/locale -I /home/kallisti5/Code/haiku/headers/build/os/storage -I /home/kallisti5/Code/haiku/headers/build/os/support -I /home/kallisti5/Code/haiku/headers/build/private -o "/home/kallisti5/Code/haiku/generated.x86_64/objects/linux/x86_64/release/build/libbe/icon/FlatIconImporter.o" ;

comment:5 Changed 2 years ago by kallisti5

Looks like all that crap was cleaned up in agg 2.4:

https://sourceforge.net/p/agg/svn/HEAD/tree/agg-2.4/include/agg_scanline_u.h#l452

Anyone feel like trying to get this upgraded to 2.4 or turned into a recipe? :-D

comment:6 Changed 2 years ago by waddlesplash

We have about ~1000-2000 lines of changes in our AGG that upstream does not have; outsourcing it is a terrible idea, even if we didn't have those changes, honestly.

The fix looks pretty easy (just removing that line, it's calling a default constructor). I can do it myself; or you can do it, since you're the one with the broken compile...

comment:7 Changed 2 years ago by kallisti5

Resolution: fixed
Status: newclosed

Or... I could just import a signle header file from 2.4 and have it fixed :-)

fixed in hrev51025. On a plus note, the haiku build works on gcc 7 hosts now.

comment:8 Changed 2 years ago by pulkomandy

We should still consider reviewing our changes, upstreaming what's needed, extracting the other stuff (I think we made some extensions to agg, which could live outside of its directory). Using the actively maintained 2.4 branch could solve some of our problems and I see no reason to not do it.

Note: See TracTickets for help on using tickets.