Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One test fails #26

Open
yurivict opened this issue Feb 22, 2023 · 10 comments
Open

One test fails #26

yurivict opened this issue Feb 22, 2023 · 10 comments
Assignees

Comments

@yurivict
Copy link

See log.

Version: 0.32
clang-14
FreeBSD 13.1

@kosloot
Copy link
Contributor

kosloot commented Feb 22, 2023

Well, unfortunately this logfile look very scrambled (Unicode/UTF problems)
But at the end it states:

 TiCC tests performed 23 testseries, with a total of 414 tests. 
There were 28 failures. Unfortunately, we expected 5 failures.

So there is a lot going wrong here. Needs investigation. Which is cumbersome as I don't have a FreeBSD system at hand.
Maybe @proycon ?

@kosloot
Copy link
Contributor

kosloot commented Feb 22, 2023

@yurivict can you provide us with the 'config.log' file? That might be helpfull

@kosloot
Copy link
Contributor

kosloot commented Feb 23, 2023

@yurivict Also the outcome of the icuinfo command could be helpful

@yurivict
Copy link
Author

config.log

$ icuinfo
 <icuSystemParams type="icu4c">
    <param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
    <param name="product">icu4c</param>
    <param name="product.full">International Components for Unicode for C/C++</param>
    <param name="version">72.1</param>
    <param name="version.unicode">15.0</param>
    <param name="platform.number">3000</param>
    <param name="platform.type">BSD</param>
    <param name="locale.default">en_US_POSIX</param>
    <param name="locale.default.bcp47">en-US-u-va-posix</param>
    <param name="converter.default">UTF-8</param>
    <param name="icudata.name">icudt72l</param>
    <param name="icudata.path">/usr/local/share/icu/72.1</param>
    <param name="cldr.version">42.0</param>
    <param name="tz.version">2022e</param>
    <param name="tz.default">America/Los_Angeles</param>
    <param name="cpu.bits">64</param>
    <param name="cpu.big_endian">0</param>
    <param name="os.wchar_width">4</param>
    <param name="os.charset_family">0</param>
    <param name="os.host">amd64-portbld-freebsd13.1</param>
    <param name="build.build">amd64-portbld-freebsd13.1</param>
    <param name="build.cc">cc</param>
    <param name="build.cxx">c++</param>
    <param name="uconfig.internal_digitlist">1</param>
    <param name="uconfig.have_parseallinput">1</param>
 </icuSystemParams>


ICU Initialization returned: U_ZERO_ERROR
Plugins are disabled.

@kosloot
Copy link
Contributor

kosloot commented Feb 23, 2023

OK, thanks.
I don't see strange things there. Except that you have a more recent ICU version then I have.
This is very puzzling.
On both Ubuntu and MaxOSX there are no problems building with Clang (on MacOSX with icu 72.1 too)

I assume you didn't get any compiler warnings during the build?

Did previous releases of ticcutils build without any trouble?

@yurivict
Copy link
Author

There are no warnings during build. Previous versions have always built without problems.

@kosloot
Copy link
Contributor

kosloot commented Feb 23, 2023

Previous versions have always built without problems.

This is odd, because at least one of the tests that fails (test_unicode_hash) is already around a few versions.

At the moment, I have no answer, nor a solution...

@diizzyy
Copy link
Contributor

diizzyy commented Jun 23, 2023

I did some backtracking and it starts occurring with this commit: ddd667d

Edit:
Might be unrelated but GCC 12 throws this error (also occurs on unpatched 0.31):

/bin/sh ../libtool  --tag=CXX   --mode=link g++12 -g -std=c++11  -W -Wall -pedantic -O2 -pipe -march=tigerlake  -D_THREAD_SAFE -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12  -DHAVE_BOOST_REGEX -Wl,-rpath=/usr/local/lib/gcc12 -isystem /usr/local/include  -fopenmp -pthread -I/usr/local/include/libxml2  -I/usr/local/include   -lboost_regex -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12 -L/usr/local/lib/gcc12 -L/usr/local/lib  -L/usr/lib -L/usr/lib -o runtest runtest.o libticcutils.la -L/usr/local/lib -licuio -licui18n -licuuc -licudata  -lpthread -lz  -lbz2 -L/usr/local/lib -lxml2
libtool: link: g++12 -g -std=c++11 -W -Wall -pedantic -O2 -pipe -march=tigerlake -D_THREAD_SAFE -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12 -DHAVE_BOOST_REGEX -Wl,-rpath=/usr/local/lib/gcc12 -isystem /usr/local/include -fopenmp -pthread -I/usr/local/include/libxml2 -I/usr/local/include -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12 -o .libs/runtest runtest.o  -lboost_regex -L/usr/local/lib/gcc12 -L/usr/local/lib -L/usr/lib ./.libs/libticcutils.so -licuio -licui18n -licuuc -licudata -lpthread -lz -lbz2 -lxml2 -pthread -fopenmp -Wl,-rpath -Wl,/usr/local/lib
/usr/local/bin/ld: runtest.o: in function `void test_eq<icu::UnicodeString, char const (&) [30]>(char const*, char const*, int, icu::UnicodeString const&, char const (& const&) [30], MyTSerie&)':
/usr/ports/devel/ticcutils/work/ticcutils-0.32/src/../include/ticcutils/UnitTest.h:316: undefined reference to `icu::operator<<(std::ostream&, icu::UnicodeString const&)'
/usr/local/bin/ld: runtest.o: in function `void test_eq<icu::UnicodeString, char const (&) [7]>(char const*, char const*, int, icu::UnicodeString const&, char const (& const&) [7], MyTSerie&)':
/usr/ports/devel/ticcutils/work/ticcutils-0.32/src/../include/ticcutils/UnitTest.h:316: undefined reference to `icu::operator<<(std::ostream&, icu::UnicodeString const&)'
/usr/local/bin/ld: runtest.o: in function `void test_eq<icu::UnicodeString const&, char const (&) [7]>(char const*, char const*, int, icu::UnicodeString const& const&, char const (& const&) [7], MyTSerie&)':
/usr/ports/devel/ticcutils/work/ticcutils-0.32/src/../include/ticcutils/UnitTest.h:316: undefined reference to `icu::operator<<(std::ostream&, icu::UnicodeString const&)'
/usr/local/bin/ld: runtest.o: in function `void test_eq<icu::UnicodeString, char const (&) [16]>(char const*, char const*, int, icu::UnicodeString const&, char const (& const&) [16], MyTSerie&)':
/usr/ports/devel/ticcutils/work/ticcutils-0.32/src/../include/ticcutils/UnitTest.h:316: undefined reference to `icu::operator<<(std::ostream&, icu::UnicodeString const&)'
/usr/local/bin/ld: runtest.o: in function `void test_eq<icu::UnicodeString, char const (&) [19]>(char const*, char const*, int, icu::UnicodeString const&, char const (& const&) [19], MyTSerie&)':
/usr/ports/devel/ticcutils/work/ticcutils-0.32/src/../include/ticcutils/UnitTest.h:316: undefined reference to `icu::operator<<(std::ostream&, icu::UnicodeString const&)'
/usr/local/bin/ld: runtest.o:/usr/ports/devel/ticcutils/work/ticcutils-0.32/src/../include/ticcutils/UnitTest.h:316: more undefined references to `icu::operator<<(std::ostream&, icu::UnicodeString const&)' follow
collect2: error: ld returned 1 exit status

@kosloot
Copy link
Contributor

kosloot commented Jun 26, 2023

Thank for your report, but I am still very puzzled.
All our builds on Linux and MacOs are working flawless. Including GCC 12 and Clang 15.
Your GCC 12 error is about the LINKING stage. So compiling works, and all includes are resolved, but the process is somehow unable to find libicuio.so (for icu::operator<<(std::ostream&, icu::UnicodeString const&)')

This may or may not have to do with your previous problem. Where even linking worked, but all calls to ICU functions failed. I really don't have a clue.
As we don't have any other BSD user complaining, I still suspect it is a local issue on your system (an I understand that is not a satisfying answer). Probably with ICU, although your icuinfo looked good.

And your config.log states
LIBS='-L/usr/local/lib -licuio -licui18n -licuuc -licudata
Which looks also OK

I will look around for a BSD system, but they are scarce in my neighborhood.

@diizzyy
Copy link
Contributor

diizzyy commented Jun 27, 2023

Different boxes (and not the same users) but we're able to replicate the same issue ;-)
LLVM/Clang is the default compiler but I tried GCC mostly out of curiosity to rule out compiler bugs.

If you want a quick setup, fire up a VM (1-2G of RAM will do if you don't use ZFS as filesystem).

  • Do a basic install (takes a few minutes, boot only or memstick is fine) of 13.2 (13.1 is soo EoL), don't install the ports tree
  • Run pkg install git
  • Clone the ports tree (will take a while) as root: cd /usr && git clone https://github.com/freebsd/freebsd-ports.git ports
  • If you want to use precompiled dependencies: pkg install ticcutils && pkg delete ticcutils (as root)
  • If you want to use the latest versions of dependencies available (may need more memory than 2G depending on amount of cores available as you will be building all lib deps from source): pkg delete -a -f && cd /usr/ports/devel/ticcutils && make BATCH=yes DISABLE_VULNERABILITIES=yes depends clean clean-depends
  • Run make test in /usr/ports/devel/ticcutils to build ticcutils and execute unit tests. make clean to clean up (remove work directory)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants