-
Notifications
You must be signed in to change notification settings - Fork 56
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
.configure wrong for CPPUNIT #104
Comments
That's odd. Ubuntu 20.04 should provide CppUnit in version 1.15.1-2. What screen output do you get with these commands? pkg-config --print-provides cppunit dpkg -s $(dpkg -l '*cppunit*' | grep 'libcppunit-[0-9]' | cut -d' ' -f3) | grep '^Version:' |
thanks for the quick reply pkg-config --print-provides cppunit dpkg -s $(dpkg -l 'cppunit' | grep 'libcppunit-[0-9]' | cut -d' ' -f3) | grep '^Version:' cat /etc/os-release I've made a 'make distclean' followed by 'autoreconf ... etc.' --> no error ... |
Sorry to ask again, did you not install anything afterwards (e.g. pkg-config) between your two tests? |
Could be. I have installed other packages in the meantime. After no more errors were displayed, I ran the following:
|
This looks like the problem I fixed last week. Since the Linux kernel 5.13.0-1023 the behavior of the ioctl TIOCSTI has changed, so that after an EOT no further characters can be read. Therefore, I had to change The fix: 317883a#diff-0aa01eb3aba1ae0b403c91b3478d00fae585cf400b0bea930a50eba1b87b99c2 I think you are still using a version before May 25, 2022 that did not have this fix in it. Please try again with the latest version. |
I moved the "old" directory and start:
|
What happens if you start the unit test separately? & test/fkeyboard_test Please do not make any keystrokes while the test is running. Ensure that no background processes are running that can output characters to the terminal. When the process crashes, a backtrace would be helpful. & LD_LIBRARY_PATH=final/.libs/ gdb test/.libs/fkeyboard_test
(gdb) run
(gdb) bt By the way, here is a successful run of all unit tests on Ubuntu 20.04.4: https://github.com/gansm/finalcut/runs/6643674091?check_suite_focus=true |
Therefor I've started (in the meantime i have added some debug output ;-) ):
If I look at |
Sorry for the incorrect gdb command.
Very strange, in line 3096 there is no call at all. What do you have in line 3096? sed -n '3096p' test/fkeyboard-test.cpp Do you get the same result with these commands? & make distclean
& ./build.sh unit-test Maybe you still have an old version of & ldd test/.libs/fkeyboard_test Even helpful would be to call these debug commands after the crash. (gdb) frame 3
(gdb) list
(gdb) info locals
(gdb) frame 2
(gdb) list
(gdb) info locals |
Thanks a lot for your service!
no difference.
On a complete new virtual machine on Win 10 (wsl and Ubuntu 20.04) I get other errors, but also for keyboard... |
And the library & ls -l /usr/lib/libfinal.so.0
& ls -l final/.libs/libfinal.so.0
& dpkg -S /usr/lib/libfinal.so.0
& ldconfig -v | grep 'libfinal' |
I checked the difference of the 2 libraries:
In the file './final/input/fkeyboard.cpp' I#ve made some 'DEBUG BY PRINT': ' ./test/fkeyboard_test' shows:
|
Okay, we have the following situation:
It looks like the memory behind We have the following escape sequences:
What would be helpful now is The output of |
|
I think we should focus more on the data source. Could you please include the following debug lines in inline FKey FKeyboard::getTermcapKey()
{
// Looking for termcap key strings in the buffer
static_assert ( FIFO_BUF_SIZE > 0 , "FIFO buffer too small" );
if ( key_cap_ptr.use_count() == 0 )
return NOT_SET;
const auto buf_len = fifo_buf.getSize();
//------ DEBUG OUTPUT ------
std::cerr << "buf_len = " << buf_len << "\n";
std::cerr << "array size = " << key_cap_ptr->size() << "\n";
std::cerr << "difference1 = " << (key_cap_ptr->cend() - key_cap_ptr->cbegin()) << "\n";
std::cerr << "difference2 = " << (key_cap_end - key_cap_ptr->cbegin()) << "\n";
//for (const auto& cap_key : *key_cap_ptr)
// std::cerr << "{ '" << (cap_key.string ? "1" : "0") << "', " << cap_key.length << " }\n";
//------ DEBUG OUTPUT ------
const auto& found_key = std::find_if
(
key_cap_ptr->cbegin(),
key_cap_end,
[this, &buf_len] (const auto& cap_key)
... Your output should then look like these lines:
|
Output:
If I uncomment the for - loop:
|
Great, there we have the problem! The pointer to the end of the std::array points beyond the end. The question now is - Why do you get a wrong end-iterator from the std::array? Perhaps the |
now, with g++-9, it works:
with g++-12.1 nothing changed. I get the same error again. |
I made a few more changes (92c501f) and hope that the unit test with g++ 12.1 runs error-free for you. Could you test this on your system to verify if this is the case? |
man this thing is like chinesse for me |
@alavaelian is right! I would need some clarity here if the (segmentation fault) crashes with g++-12.1 are still an issue. @Barchfeld: Could you please test again if the current code fixes this problem? I require your support here. Unfortunately, I can't check it myself because I can't reproduce this error. |
Describe the bug
I have to comment the line
PKG_CHECK_MODULES(CPPUNIT, cppunit > 1.12.0)
How to reproduce the bug?
if this line is uncommented, an error message will appear
./configure: line 14540: syntax error near unexpected token
CPPUNIT,' ./configure: line 14540:
PKG_CHECK_MODULES(CPPUNIT, cppunit > 1.12.0)'What behavior did you expect?
No error message
In which environment did the bug occur?
Which operating system do you use?
Ubuntu 20.04
Which distribution do you use?
On which CPU architecture did you test?
X64
Which compiler in which version did you use?
g++-9
g++-12.1
Which terminal do you use?
putty
What does the environment variable $TERM contain?
xterm
The text was updated successfully, but these errors were encountered: