Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#16923 closed build error (fixed)

undefined reference to `_wx_link_dummy_func_wxhtml_chm_support()'

Reported by: clampak Owned by: Vadim Zeitlin <vadim@…>
Priority: normal Milestone:
Component: build Version: 3.0.2
Keywords: Cygwin Cc:
Blocked By: Blocking:
Patch: no

Description

Cygwin 1.7.35-1 on Windows XP.

make fails here:

g++ -shared -o /home/User/src/wxWidgets-3.0.2/lib/cygwxmsw30u_html_gcc_custom-0.dll htmldll_version_rc.o htmldll_helpbest.o htmldll_helpctrl.o htmldll_helpdata.o htmldll_helpdlg.o htmldll_helpfrm.o htmldll_helpwnd.o htmldll_htmlcell.o htmldll_htmlfilt.o htmldll_htmlpars.o htmldll_htmltag.o htmldll_htmlwin.o htmldll_htmprint.o htmldll_m_dflist.o htmldll_m_fonts.o htmldll_m_hline.o htmldll_m_image.o htmldll_m_layout.o htmldll_m_links.o htmldll_m_list.o htmldll_m_pre.o htmldll_m_span.o htmldll_m_style.o htmldll_m_tables.o htmldll_styleparams.o htmldll_winpars.o htmldll_htmllbox.o -L/home/User/src/wxWidgets-3.0.2/lib -L/home/User/src/wxWidgets-3.0.2/lib    -L/home/User/src/wxWidgets-3.0.2/lib  -Wl,--out-implib=/home/User/src/wxWidgets-3.0.2/lib/libwx_mswu_html-3.0.dll.a         -lpng -lz -ljpeg -ltiff  -lwxregexu-3.0  -lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 -lkernel32 -luser32  -lwx_mswu_core-3.0 -lwx_baseu-3.0 -lmspack -lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 -lkernel32 -luser32

with this error:

htmldll_helpctrl.o:helpctrl.cpp:(.text.startup+0x2c): undefined reference to `_wx_link_dummy_func_wxhtml_chm_support()'
collect2: error: ld returned 1 exit status
Makefile:15716: recipe for target '/home/User/src/wxWidgets-3.0.2/lib/cygwxmsw30u_html_gcc_custom-0.dll' failed
make: *** [/home/User/src/wxWidgets-3.0.2/lib/cygwxmsw30u_html_gcc_custom-0.dll] Error 1

Change History (7)

comment:1 follow-up: Changed 5 years ago by vadz

How was the library configured? This is clearly a bug but I am not sure where exactly it is and being able to reproduce it would help.

Also, you should be able to use --without-libmspack to work around it for now.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 5 years ago by clampak

Replying to vadz:

How was the library configured? This is clearly a bug but I am not sure where exactly it is and being able to reproduce it would help.

I don't know, where would I get that info?

Also, you should be able to use --without-libmspack to work around it for now.

I'll give that a try.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 5 years ago by vadz

Replying to clampak:

Replying to vadz:

How was the library configured? This is clearly a bug but I am not sure where exactly it is and being able to reproduce it would help.

I don't know, where would I get that info?

Err, if you use Cygwin you must have run configure, so which arguments did you give to it?

comment:4 in reply to: ↑ 3 Changed 5 years ago by clampak

Replying to vadz:

Replying to clampak:

Replying to vadz:

How was the library configured? This is clearly a bug but I am not sure where exactly it is and being able to reproduce it would help.

I don't know, where would I get that info?

Err, if you use Cygwin you must have run configure, so which arguments did you give to it?

Right, sorry.
./configure --enable-utf8 --with-libmspack

comment:5 Changed 5 years ago by jan_van_dijk

If I understand the build system correctly...

It seems that chm.cpp is simply never built for the MSW platform: chm.cpp is added only for UNIX and MACOSX in files.bkl. If this is supposed to work, should this not be fixed by applying the following (and regenerating the make files)? Note that --after preprocessing-- chm.cpp is empty if mspack is not available, so this also works in that case.

Warning: I could not test this; I cross-compile on linux using MXE and do not have mspack available myself.

diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 5baee04..0f55b07 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -3353,6 +3353,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
 <set var="HTML_SRC_PLATFORM">
     <if cond="TOOLKIT=='MSW'">
         src/msw/helpbest.cpp
+        src/html/chm.cpp
     </if>
     <if cond="PLATFORM_UNIX=='1'">
         src/html/chm.cpp

comment:6 Changed 5 years ago by Vadim Zeitlin <vadim@…>

  • Owner set to Vadim Zeitlin <vadim@…>
  • Resolution set to fixed
  • Status changed from new to closed

In c5d29608b1a50319e1419ff7328e699da53ac39d/git-wxWidgets:

Build src/html/chm.cpp as part of wxMSW.

In native MSW builds this file is not needed as wxUSE_LIBMSPACK is always 0
anyhow, but it is required when cross-compiling or using Cygwin and libmspack
was detected by configure.

Closes #16923.

comment:7 Changed 5 years ago by Vadim Zeitlin <vadim@…>

In a3fc5c5400eb750faa63f1691ac4e243f6e7da54/git-wxWidgets:

Update MSBuild wxHTML project to match the old MSVC one

The MSBuild project was not updated in c5d29608b1a50319e1419ff7328e699da53ac39d
so do it now, using upmake.

See #16923.

Note: See TracTickets for help on using tickets.