Re: libc++ vs. libstdc++ usage in the ports tree

From: Rainer Hurling <rhurlin_at_gwdg.de>
Date: Thu, 14 Nov 2013 12:49:27 +0100
Am 14.11.2013 10:54 (UTC+1) schrieb David Chisnall:
> On 13 Nov 2013, at 19:40, Dimitry Andric <dim_at_freebsd.org> wrote:
> 
>> On the other hand, different C++ standard libraries simply cannot be
>> mixed.  The internal implementations are usually completely different.
>> This is not really news at all, certainly not to the ports people. :-)
> 
> That said, it should still be possible to mix them in different libraries.
> The constraint from the wiki still applies: if you don't use STL types at library boundaries, then it should still work.  If you do, then the libc++ and libstdc++ symbols will be mangled differently and so you will get link-time errors.
> 
> In theory, if it links it should run...
> 
> David

With the in this thread described change of the behaviour in 10.x and
HEAD, I have massive problems with building my port math/saga. Before
the changes, all built and worked fine.

Now, even when I add

  USES=   compiler:openmp
  CXXFLAGS+=      -std=gnu++0x

and commenting out USE_GCC=any

in the Makefile of math/saga, the build breaks with problems between
x11-toolkits/wxgtk29 (build with clang) and math/saga (try to build with
gcc46), see below, please.

I am clueless, what to do here. Building x11-toolkits/wxgtk29 with
gcc46+ is not an option.

Any help is really appreciated,
Rainer Hurling


make -D MAKE_JOBS_UNSAFE=yes
===>  Building for saga-2.1.0_2
--- all ---
/usr/bin/make  all-recursive
--- all-recursive ---
Making all in .
Making all in src
--- all-recursive ---
Making all in saga_core
--- all-recursive ---
Making all in saga_api
Making all in saga_odbc
Making all in saga_gdi
Making all in saga_cmd
--- all-recursive ---
Making all in man
Making all in saga_gui
--- all-recursive ---
Making all in man
--- saga_gui ---
/bin/sh ../../../libtool  --tag=CXX    --mode=link g++46 -fPIC
-D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_DONOTUSE_HARU
-D"MODULE_LIBRARY_PATH=\"/usr/local/lib/saga\""
-D"SHARE_PATH=\"/usr/local/share/saga\""  -I.. -I.
`/usr/local/bin/wxgtk2u-2.9-config --unicode=yes --cxxflags`
-D_SAGA_UNICODE -fopenmp  -O2 -pipe -I/usr/local/include
-Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -std=gnu++0x
-Wl,-rpath=/usr/local/lib/gcc46 -fPIC `/usr/local/bin/wxgtk2u-2.9-config
--unicode=yes --libs adv,aui,base,core,html,net,propgrid,xml`
-L/usr/local/lib -lopencv_core -pthread -Wl,-rpath=/usr/local/lib/gcc46
-o saga_gui active.o active_attributes.o  active_description.o
active_history.o  active_HTMLExtraInfo.o active_legend.o
active_parameters.o callback.o  data_source.o data_source_files.o
data_source_odbc.o dc_helper.o  dlg_about.o dlg_about_logo.o  dlg_base.o
dlg_colors.o  dlg_colors_control.o dlg_list_base.o  dlg_list_grid.o
dlg_list_pointcloud.o  dlg_list_shapes.o dlg_list_table.o
dlg_list_tin.o dlg_parameters.o  dlg_table.o dlg_text.o helper.o  info.o
info_messages.o  parameters_control.o parameters_properties.o  project.o
res_commands.o  res_controls.o res_dialogs.o  res_images.o saga.o
saga_frame.o  saga_frame_droptarget.o view_base.o  view_histogram.o
view_layout.o  view_layout_control.o view_layout_info.o
view_layout_printout.o view_map.o  view_map_3d.o view_map_3d_image.o
view_map_control.o view_ruler.o  view_scatterplot.o view_table.o
view_table_control.o view_table_diagram.o  wksp.o wksp_base_control.o
wksp_base_item.o wksp_base_manager.o  wksp_data_control.o
wksp_data_item.o  wksp_data_layers.o wksp_data_manager.o
wksp_data_menu_file.o wksp_data_menu_files.o  wksp_grid.o
wksp_grid_manager.o  wksp_grid_system.o wksp_layer.o
wksp_layer_classify.o wksp_layer_legend.o  wksp_map.o wksp_map_buttons.o
 wksp_map_control.o wksp_map_dc.o  wksp_map_layer.o wksp_map_manager.o
wksp_module.o wksp_module_control.o  wksp_module_library.o
wksp_module_manager.o  wksp_module_menu.o wksp_pointcloud.o
wksp_pointcloud_manager.o wksp_shapes.o  wksp_shapes_edit.o
wksp_shapes_line.o  wksp_shapes_manager.o wksp_shapes_point.o
wksp_shapes_points.o wksp_shapes_polygon.o  wksp_shapes_type.o
wksp_table.o  wksp_table_manager.o wksp_tin.o  wksp_tin_manager.o
../saga_api/libsaga_api.la ../saga_odbc/libsaga_odbc.la
libtool: link: g++46 -fPIC -D_SAGA_LINUX -D_TYPEDEF_BYTE -D_TYPEDEF_WORD
-D_SAGA_DONOTUSE_HARU -DMODULE_LIBRARY_PATH=\"/usr/local/lib/saga\"
-DSHARE_PATH=\"/usr/local/share/saga\" -I.. -I.
-I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9
-D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -D_THREAD_SAFE
-D_SAGA_UNICODE -fopenmp -O2 -pipe -I/usr/local/include
-Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -std=gnu++0x
-Wl,-rpath=/usr/local/lib/gcc46 -fPIC -pthread -pthread
-Wl,-rpath=/usr/local/lib/gcc46 -o .libs/saga_gui active.o
active_attributes.o active_description.o active_history.o
active_HTMLExtraInfo.o active_legend.o active_parameters.o callback.o
data_source.o data_source_files.o data_source_odbc.o dc_helper.o
dlg_about.o dlg_about_logo.o dlg_base.o dlg_colors.o
dlg_colors_control.o dlg_list_base.o dlg_list_grid.o
dlg_list_pointcloud.o dlg_list_shapes.o dlg_list_table.o dlg_list_tin.o
dlg_parameters.o dlg_table.o dlg_text.o helper.o info.o info_messages.o
parameters_control.o parameters_properties.o project.o res_commands.o
res_controls.o res_dialogs.o res_images.o saga.o saga_frame.o
saga_frame_droptarget.o view_base.o view_histogram.o view_layout.o
view_layout_control.o view_layout_info.o view_layout_printout.o
view_map.o view_map_3d.o view_map_3d_image.o view_map_control.o
view_ruler.o view_scatterplot.o view_table.o view_table_control.o
view_table_diagram.o wksp.o wksp_base_control.o wksp_base_item.o
wksp_base_manager.o wksp_data_control.o wksp_data_item.o
wksp_data_layers.o wksp_data_manager.o wksp_data_menu_file.o
wksp_data_menu_files.o wksp_grid.o wksp_grid_manager.o
wksp_grid_system.o wksp_layer.o wksp_layer_classify.o
wksp_layer_legend.o wksp_map.o wksp_map_buttons.o wksp_map_control.o
wksp_map_dc.o wksp_map_layer.o wksp_map_manager.o wksp_module.o
wksp_module_control.o wksp_module_library.o wksp_module_manager.o
wksp_module_menu.o wksp_pointcloud.o wksp_pointcloud_manager.o
wksp_shapes.o wksp_shapes_edit.o wksp_shapes_line.o
wksp_shapes_manager.o wksp_shapes_point.o wksp_shapes_points.o
wksp_shapes_polygon.o wksp_shapes_type.o wksp_table.o
wksp_table_manager.o wksp_tin.o wksp_tin_manager.o  -L/usr/local/lib
-lwx_gtk2u_aui-2.9 -lwx_gtk2u_propgrid-2.9
../saga_api/.libs/libsaga_api.so -L/usr/lib
../saga_odbc/.libs/libsaga_odbc.so -lodbc
/usr/ports/math/saga/work/saga_2.1.0_src/src/saga_core/saga_api/.libs/libsaga_api.so
-lwx_gtk2u_xrc-2.9 -lwx_gtk2u_webview-2.9 -lwx_gtk2u_html-2.9
-lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9
-lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9
/usr/local/lib/libhpdf.so -lm -lz -lpng -lopencv_core -fopenmp -pthread
-Wl,-rpath -Wl,/usr/local/lib
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x740): undefined reference to `non-virtual thunk
to wxHtmlWindow::SetHTMLWindowTitle(wxString const&)'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x748): undefined reference to `non-virtual thunk
to wxHtmlWindow::OnHTMLLinkClicked(wxHtmlLinkInfo const&)'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x750): undefined reference to `non-virtual thunk
to wxHtmlWindow::OnHTMLOpeningURL(wxHtmlURLType, wxString const&,
wxString*) const'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x758): undefined reference to `non-virtual thunk
to wxHtmlWindow::HTMLCoordsToWindow(wxHtmlCell*, wxPoint const&) const'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x760): undefined reference to `non-virtual thunk
to wxHtmlWindow::GetHTMLWindow()'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x768): undefined reference to `non-virtual thunk
to wxHtmlWindow::GetHTMLBackgroundColour() const'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x770): undefined reference to `non-virtual thunk
to wxHtmlWindow::SetHTMLBackgroundColour(wxColour const&)'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x778): undefined reference to `non-virtual thunk
to wxHtmlWindow::SetHTMLBackgroundImage(wxBitmap const&)'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x780): undefined reference to `non-virtual thunk
to wxHtmlWindow::SetHTMLStatusText(wxString const&)'
active_description.o:(.data.rel.ro._ZTV19CACTIVE_Description[vtable for
CACTIVE_Description]+0x788): undefined reference to `non-virtual thunk
to wxHtmlWindow::GetHTMLCursor(wxHtmlWindowInterface::HTMLCursor) const'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x740): undefined reference to `non-virtual
thunk to wxHtmlWindow::SetHTMLWindowTitle(wxString const&)'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x748): undefined reference to `non-virtual
thunk to wxHtmlWindow::OnHTMLLinkClicked(wxHtmlLinkInfo const&)'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x750): undefined reference to `non-virtual
thunk to wxHtmlWindow::OnHTMLOpeningURL(wxHtmlURLType, wxString const&,
wxString*) const'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x758): undefined reference to `non-virtual
thunk to wxHtmlWindow::HTMLCoordsToWindow(wxHtmlCell*, wxPoint const&)
const'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x760): undefined reference to `non-virtual
thunk to wxHtmlWindow::GetHTMLWindow()'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x768): undefined reference to `non-virtual
thunk to wxHtmlWindow::GetHTMLBackgroundColour() const'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x770): undefined reference to `non-virtual
thunk to wxHtmlWindow::SetHTMLBackgroundColour(wxColour const&)'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x778): undefined reference to `non-virtual
thunk to wxHtmlWindow::SetHTMLBackgroundImage(wxBitmap const&)'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x780): undefined reference to `non-virtual
thunk to wxHtmlWindow::SetHTMLStatusText(wxString const&)'
active_HTMLExtraInfo.o:(.data.rel.ro._ZTV21CACTIVE_HTMLExtraInfo[vtable
for CACTIVE_HTMLExtraInfo]+0x788): undefined reference to `non-virtual
thunk to wxHtmlWindow::GetHTMLCursor(wxHtmlWindowInterface::HTMLCursor)
const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x7f0): undefined reference to `non-virtual thunk to
wxTextCtrlBase::overflow(int)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x818): undefined reference to `non-virtual thunk to
wxTextCtrl::GetLineLength(long) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x820): undefined reference to `non-virtual thunk to
wxTextCtrl::GetLineText(long) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x828): undefined reference to `non-virtual thunk to
wxTextCtrl::GetNumberOfLines() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x830): undefined reference to `non-virtual thunk to
wxTextCtrl::IsModified() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x838): undefined reference to `non-virtual thunk to
wxTextCtrl::MarkDirty()'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x840): undefined reference to `non-virtual thunk to
wxTextCtrl::DiscardEdits()'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x848): undefined reference to `non-virtual thunk to
wxTextCtrl::SetStyle(long, long, wxTextAttr const&)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x850): undefined reference to `non-virtual thunk to
wxTextCtrl::GetStyle(long, wxTextAttr&)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x858): undefined reference to `non-virtual thunk to
wxTextCtrlBase::SetDefaultStyle(wxTextAttr const&)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x868): undefined reference to `non-virtual thunk to
wxTextCtrl::XYToPosition(long, long) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x870): undefined reference to `non-virtual thunk to
wxTextCtrl::PositionToXY(long, long*, long*) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x878): undefined reference to `non-virtual thunk to
wxTextCtrl::ShowPosition(long)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x880): undefined reference to `non-virtual thunk to
wxTextCtrl::HitTest(wxPoint const&, long*) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x890): undefined reference to `non-virtual thunk to
wxTextCtrl::GetValue() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x8b8): undefined reference to `non-virtual thunk to
wxTextCtrl::DoPositionToCoords(long) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x8f0): undefined reference to `non-virtual thunk to
wxTextCtrl::WriteText(wxString const&)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x900): undefined reference to `non-virtual thunk to
wxTextCtrl::GetValue() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x918): undefined reference to `non-virtual thunk to
wxTextCtrl::Remove(long, long)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x928): undefined reference to `non-virtual thunk to
wxTextCtrl::Copy()'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x930): undefined reference to `non-virtual thunk to
wxTextCtrl::Cut()'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x938): undefined reference to `non-virtual thunk to
wxTextCtrl::Paste()'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x978): undefined reference to `non-virtual thunk to
wxTextCtrl::SetInsertionPoint(long)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x988): undefined reference to `non-virtual thunk to
wxTextCtrl::GetInsertionPoint() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x990): undefined reference to `non-virtual thunk to
wxTextCtrl::GetLastPosition() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x998): undefined reference to `non-virtual thunk to
wxTextCtrl::SetSelection(long, long)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x9b0): undefined reference to `non-virtual thunk to
wxTextCtrl::GetSelection(long*, long*) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x9c0): undefined reference to `non-virtual thunk to
wxTextCtrl::IsEditable() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x9c8): undefined reference to `non-virtual thunk to
wxTextCtrl::SetEditable(bool)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x9d8): undefined reference to `non-virtual thunk to
wxTextCtrlBase::SetHint(wxString const&)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0x9e8): undefined reference to `non-virtual thunk to
wxTextCtrl::DoSetValue(wxString const&, int)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0xa28): undefined reference to `non-virtual thunk to
wxTextCtrl::EnableTextChangedEvents(bool)'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0xa30): undefined reference to `non-virtual thunk to
wxTextCtrl::GTKIMFilterKeypress(_GdkEventKey*) const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0xa38): undefined reference to `non-virtual thunk to
wxTextCtrl::GetEditable() const'
info_messages.o:(.data.rel.ro._ZTV14CINFO_Messages[vtable for
CINFO_Messages]+0xa40): undefined reference to `non-virtual thunk to
wxTextCtrl::GetEntry() const'
view_table_control.o:(.data.rel.ro._ZTV19CVIEW_Table_Control[vtable for
CVIEW_Table_Control]+0x6f8): undefined reference to `non-virtual thunk
to wxGrid::GetSizeAvailableForScrollTarget(wxSize const&)'
collect2: ld returned 1 exit status
*** [saga_gui] Error code 1

make[7]: stopped in
/usr/ports/math/saga/work/saga_2.1.0_src/src/saga_core/saga_gui
1 error
Received on Thu Nov 14 2013 - 10:49:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:44 UTC