Opened 13 years ago

Closed 13 years ago

#894 closed bug (fixed)

Printing Addons fail to build under GCC4

Reported by: engima Owned by: axeld
Priority: normal Milestone: R1
Component: Drivers Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

I'm building hrev19033 under Gentoo Linux with the GCC4 cross tools. When attempting to build the haiku-image target the compilation failed with a number of syntax errors relating to a preprocessor definition, stricter type checking and libstdc++. I'm attaching a patch to fix the compilation issues. However due to a link of printer I cannot verify their correctness (Really simple fixes though, so shouldn't be an issue).

Unfortunately linking produces errors such as the following (truncated):

Link /home/danny/projects/haiku/haiku/generated_gcc4/objects/haiku/x86/release/add-ons/print/drivers/canon_lips/lips3/Canon LIPS3 Compatible
/home/danny/projects/haiku/haiku/generated_gcc4/objects/haiku/x86/release/add-ons/print/shared/libprint.a(JobSetupDlg.o): In function `JobSetupView::AttachedToWindow()':
JobSetupDlg.cpp:(.text+0x2789): undefined reference to `std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'
JobSetupDlg.cpp:(.text+0x2af0): undefined reference to `std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'
JobSetupDlg.cpp:(.text+0x2e40): undefined reference to `vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
JobSetupDlg.cpp:(.text+0x2e58): undefined reference to `vtable for std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >'
JobSetupDlg.cpp:(.text+0x2e8f): undefined reference to `vtable for std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'

I've tried adding the stdc++ library to the list of libraries linked against for both lips3 and libprint.a to no effect.

Attachments (1)

print_compile.diff (8.0 KB ) - added by engima 13 years ago.
Fixes for compilation issues under GCC4

Download all attachments as: .zip

Change History (3)

by engima, 13 years ago

Attachment: print_compile.diff added

Fixes for compilation issues under GCC4

comment:1 by engima, 13 years ago

Gah, I've got no idea what I was thinking with the 'correction' in shared/PicturePrinter.cpp However the original still produces error under GCC4, concatenating with the parenthesis. I'll leave the diff as is to show the location of the define.

comment:2 by axeld, 13 years ago

Resolution: fixed
Status: newclosed

This has been fixed in the mean time, dunno what exact revision (we have now hrev19166).

Note: See TracTickets for help on using tickets.