Opened 27 hours ago

Closed 4 hours ago

#71304 closed defect (fixed)

xercesc3 @3.3.0: Ports using libxerces-c-3.3.dylib fail: symbol not found in flat namespace '_xercesc_messages_3_2_dat'

Reported by: matty0ung (Matt Young) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.10.4
Keywords: haspatch Cc: nerdling (Jeremy Lavergne), scantor (Scott Cantor), mohd-akram (Mohamed Akram)
Port: xercesc3

Description

Up until a day or two ago, xalanc was working just fine. However, after xercesc3 was upgraded yesterday or the day before from 3.2.4 to 3.3.0, xalanc no longer installs. During the install you get an error "symbol not found in flat namespace '_xercesc_messages_3_2_dat'" during "Linking CXX executable MsgCreator"

Attachments (1)

portInstallOutput.txt (67.8 KB) - added by matty0ung (Matt Young) 24 hours ago.
Output from port installed and port -v install xercesc3

Download all attachments as: .zip

Change History (10)

comment:1 Changed 26 hours ago by reneeotten (Renee Otten)

please add the main.log file that is mentioned in the error message as an attachment to this ticket

comment:2 Changed 26 hours ago by reneeotten (Renee Otten)

Port: xalanc added
Summary: xalanc won't install now that xercesc3 has been upgraded to 3.3.0xalanc: build failure with xercesc3@3.3.0

comment:3 Changed 24 hours ago by matty0ung (Matt Young)

I don't have direct access to the main.log file. I don't own a Mac and am doing everything remotely via GitHub Actions. (It's for the automated builds of https://github.com/Brewtarget/brewtarget, which runs on Windows, Mac and Linux, courtesy of Qt.) But I'll see what extra diagnostics I can get.

Changed 24 hours ago by matty0ung (Matt Young)

Attachment: portInstallOutput.txt added

Output from port installed and port -v install xercesc3

comment:4 Changed 23 hours ago by ryandesign (Ryan Carsten Schmidt)

Cc: nerdling scantor mohd-akram added
--->  Scanning binaries for linking errors
Could not open /opt/local/lib/libxerces-c-3.2.dylib: Error opening or reading file (referenced from /opt/local/bin/Xalan)

So the libxerces install_name has changed, so all ports that link with that library (including xalanc) need to have their revisions increased. This was done three hours ago in [4fed8441fb0295a152ad273b6bba7f4c0f5278e6/macports-ports]. In addition, at least xalanc apparently needs a patch for compatibility with xercesc version 3.3.

Last edited 19 hours ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 19 hours ago by ryandesign (Ryan Carsten Schmidt)

Port: xercesc3 added; xalanc removed
Summary: xalanc: build failure with xercesc3@3.3.0xercesc3 @3.3.0: Ports using libxerces-c-3.3.dylib fail: symbol not found in flat namespace '_xercesc_messages_3_2_dat'
Version: 2.10.4

I am able to reproduce the xalanc build failure but I now think this is a bug in xercesc3 @3.3.0 because other ports fail with the same message. nco for example fails to configure; its config.log says:

configure:5274: checking whether we are cross compiling
configure:5282: ccache /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64 -I/opt/local/include -I/opt/local/include/udunits2 -I/opt/local/include -DENABLE_NETCDF4 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -lxerces-c -Wl,-rpath,/opt/local/lib/libgcc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64 conftest.c  >&5
configure:5286: $? = 0
configure:5293: ./conftest
dyld[5155]: symbol not found in flat namespace (_xercesc_messages_3_2_dat)
./configure: line 5295:  5155 Abort trap: 6           ./conftest$ac_cv_exeext
configure:5297: $? = 134
configure:5304: error: in '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_nco/nco/work/nco-5.2.9':
configure:5306: error: cannot run C compiled programs.

enigma builds and installs but it fails to run:

% enigma
dyld[17071]: symbol not found in flat namespace (_xercesc_messages_3_2_dat)
zsh: abort      enigma

I believe the problem is in the file src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp which says:

/*
 *  Resource Data Reference.
 *
 *  The data is packaged as a dll (or .so or whatever, depending on the platform) that exports a data symbol.
 *  The application (this *.cpp) references that symbol here, and will pass the data address to ICU, which
 *  will then  be able to fetch resources from the data.
 */
#define ENTRY_POINT xercesc_messages_3_2_dat
#define BUNDLE_NAME "xercesc_messages_3_2"

Surely for version 3.3.x that should be 3_3 not 3_2.

Last edited 19 hours ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 19 hours ago by ryandesign (Ryan Carsten Schmidt)

I've filed this bug report to see if the developer concur: https://issues.apache.org/jira/browse/XERCESC-2257

Version 0, edited 19 hours ago by ryandesign (Ryan Carsten Schmidt) (next)

comment:7 in reply to:  5 Changed 18 hours ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

Replying to ryandesign:

Surely for version 3.3.x that should be 3_3 not 3_2.

Making that change works for me: https://github.com/macports/macports-ports/pull/26597

comment:8 Changed 4 hours ago by remkos (Remko Scharroo)

I have the same problem during the configuration phase of nco. From the config.log:

configure:5282: /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch x86_64 -I/opt/local/include -I/opt/local/include/udunits2 -I/opt/local/include -DENABLE_NETCDF4 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -lxerces-c -Wl,-rpath,/opt/local/lib/libgcc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch x86_64 conftest.c  >&5
configure:5286: $? = 0
configure:5293: ./conftest
dyld[1621]: symbol not found in flat namespace '_xercesc_messages_3_2_dat'
./configure: line 5295:  1621 Abort trap: 6           ./conftest$ac_cv_exeext

After implementing the patch from comment:5, nco did configure and compile. I would therefore like to support the adoption of https://github.com/macports/macports-ports/pull/26597

comment:9 Changed 4 hours ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 526b2259f852598effef2c0f2327fa714b903fe5/macports-ports (master):

xercesc3: Fix _xercesc_messages_3_2_dat symbol problem

For version 3.3.0 it should be _xercesc_messages_3_3_dat.

Closes: #71304

Note: See TracTickets for help on using tickets.