aMule Forum

English => Compilation problems => Topic started by: Radek on February 07, 2008, 02:09:36 PM

Title: SVN20080207 Win32/MingW - make check fails
Post by: Radek on February 07, 2008, 02:09:36 PM
Hi!

From time to time I run "make check" and now I want to report an error message received while compiling:

Code: [Select]
if g++ -DHAVE_CONFIG_H -I. -I/home/rb/src/amule-cvs/unittests/tests -I../..    -I/home/rb/src/amule-cvs/unittests/tests -I/home/rb/src/amule-cvs/unittests/tests/.. -I/home/rb/src/amule-cvs/src -I/home/rb/src/amule-cvs/src/libs -I/home/rb/src/amule-cvs/src/include -isystem /mingw/lib/wx/include/msw-unicode-release-static-2.8 -isystem /mingw/include/wx-2.8 -D__WXMSW__ -mthreads -DwxUSE_GUI=0 -DMULEUNIT    -DNOMINMAX -isystem /usr/include -D__CRYPTO_INSTALLED__ -g -D__DEBUG__ -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0   -DUSE_WX_EXTENSIONS -MT PathTest-PathTest.o -MD -MP -MF ".deps/PathTest-PathTest.Tpo" -c -o PathTest-PathTest.o `test -f 'PathTest.cpp' || echo '/home/rb/src/amule-cvs/unittests/tests/'`PathTest.cpp; \
then mv -f ".deps/PathTest-PathTest.Tpo" ".deps/PathTest-PathTest.Po"; else rm -f ".deps/PathTest-PathTest.Tpo"; exit 1; fi
p:/sources/amule-cvs/unittests/tests/PathTest.cpp: In function `wxString GetExpectedString(const wxString&)':
p:/sources/amule-cvs/unittests/tests/PathTest.cpp:40: error: invalid conversion from `const wchar_t*' to `size_t'
p:/sources/amule-cvs/unittests/tests/PathTest.cpp:40: error:   initializing argument 1 of `wxCharBuffer::wxCharBuffer(size_t)'
make[3]: *** [PathTest-PathTest.o] Error 1

Cheers!
Title: Re: SVN20080207 Win32/MingW - make check fails
Post by: Xaignar on February 07, 2008, 03:11:54 PM
Thanks for pointing that out, it's fixed now. Here's a patch if you don't want to wait for the next snapshot:
Code: [Select]
Index: unittests/tests/PathTest.cpp
===================================================================
--- unittests/tests/PathTest.cpp        (revision 8067)
+++ unittests/tests/PathTest.cpp        (working copy)
@@ -37,7 +37,7 @@
        static UsesEncoding encoding = UE_Unknown;

        if (encoding == UE_Unknown) {
-               wxCharBuffer fn = wxFNCONV(wxT("\u0627\u0644\u0639"));
+               wxCharBuffer fn = wxConvFile.cWC2MB(wxT("\u0627\u0644\u0639"));

                if (fn) {
                        encoding = UE_NonBroken;
@@ -46,7 +46,7 @@
                }
        }

-       if ((encoding == UE_Broken) && !wxFNCONV(src)) {
+       if ((encoding == UE_Broken) && !wxConvFile.cWC2MB(src)) {
                // See CPath::CPath for rationale ...
                wxCharBuffer fn = wxConvUTF8.cWC2MB(src);
                return wxConvFile.cMB2WC(fn);
Title: Re: SVN20080207 Win32/MingW - make check fails
Post by: Radek on February 07, 2008, 04:15:19 PM
Hi, Xaignar!

I applied the changes and the compilation goes through without problems now, but...

Code: [Select]
Running test-collection "CPath" with 11 test-cases:
        Test "DefaultConstructor"
        Test "PathConstructor"
        Test "CopyConstructor"
        Test "Operators"
        Test "JoinPaths"
        Test "StartsWith"
                Failure running:
                 p:/sources/amule-cvs/unittests/tests/PathTest.cpp:258 -- Not true: test.StartsWith(CPath(wxT("/")))
        Test "IsSameDir"
        Test "GetPath_FullName"
        Test "Cleanup"
        Test "AddPostFix"
                Failure running:
                 p:/sources/amule-cvs/unittests/tests/PathTest.cpp:337 -- Expected '\\foo_1.bar' but got '/foo_1.bar'
        Test "Extensions"
FAIL: PathTest

Running test-collection "TextFile" with 2 test-cases:
        Test "ReadLines"
                Failure running:
                 p:/sources/amule-cvs/unittests/tests/TextFileTest.cpp:65 -- Checking default parameters
                  p:/sources/amule-cvs/unittests/tests/TextFileTest.cpp:47 -- Checking file: TextFileTest_dos.txt
                   p:/sources/amule-cvs/unittests/tests/TextFileTest.cpp:49 -- Not true: file.Open(g_filesDefault[j], CTextFile::read)
        Test "WriteLines"
FAIL: TextFileTest
================================
2 of 7 tests failed
Please report to admin@amule.org
================================
Title: Re: SVN20080207 Win32/MingW - make check fails
Post by: Xaignar on February 07, 2008, 05:16:45 PM
Thanks, I'll look into those.