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

The build of demo applications are broken on FC32 #9

Closed
okbob opened this issue Jul 21, 2020 · 27 comments
Closed

The build of demo applications are broken on FC32 #9

okbob opened this issue Jul 21, 2020 · 27 comments

Comments

@okbob
Copy link

okbob commented Jul 21, 2020

There are some problems in linking stage:

[ 95%] Building CXX object CMakeFiles/tvdemo.dir/examples/tvdemo/puzzle.cpp.o
In file included from /usr/include/c++/10/backward/strstream:50,
                 from /home/pavel/src/tvision/include/override/strstrea.h:4,
                 from /home/pavel/src/tvision/examples/tvdemo/puzzle.cpp:29:
/usr/include/c++/10/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
   32 | #warning \
      |  ^~~~~~~
[ 95%] Building CXX object CMakeFiles/tvdemo.dir/examples/tvdemo/tvdemo1.cpp.o
[ 96%] Building CXX object CMakeFiles/tvdemo.dir/examples/tvdemo/tvdemo2.cpp.o
[ 96%] Building CXX object CMakeFiles/tvdemo.dir/examples/tvdemo/tvdemo3.cpp.o
[ 97%] Linking CXX executable tvdemo
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TWindow::streamableName() const':
:(.text+0x3): undefined reference to `TWindow::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TWindow::streamableName() const':
:(.text+0x13): undefined reference to `TWindow::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TDialog::streamableName() const':
:(.text+0x83): undefined reference to `TDialog::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TDialog::streamableName() const':
:(.text+0x93): undefined reference to `TDialog::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TCollection::streamableName() const':
:(.text+0x123): undefined reference to `TCollection::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TView::streamableName() const':
:(.text+0x183): undefined reference to `TView::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TView::streamableName() const':
:(.text+0x193): undefined reference to `TView::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TStaticText::streamableName() const':
:(.text+0x1a3): undefined reference to `TStaticText::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TStaticText::streamableName() const':
:(.text+0x1b3): undefined reference to `TStaticText::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TGroup::streamableName() const':
:(.text+0x203): undefined reference to `TGroup::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TGroup::streamableName() const':
:(.text+0x213): undefined reference to `TGroup::name'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TAsciiChart::read(ipstream&)':
:(.text+0x2b6): undefined reference to `TWindow::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TAsciiChart::read(ipstream&)':
:(.text+0x2ca): undefined reference to `TWindow::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TCalendarWindow::read(ipstream&)':
:(.text+0x2e6): undefined reference to `TWindow::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TCalendarWindow::read(ipstream&)':
:(.text+0x2fa): undefined reference to `TWindow::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TPuzzleWindow::read(ipstream&)':
:(.text+0x316): undefined reference to `TWindow::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o::(.text+0x32a): more undefined references to `TWindow::read(ipstream&)' follow
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TTable::read(ipstream&)':
:(.text+0x366): undefined reference to `TView::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `non-virtual thunk to TTable::read(ipstream&)':
:(.text+0x37a): undefined reference to `TView::read(ipstream&)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TTable::build()':
:(.text+0x3aa): undefined reference to `TView::TView(StreamableInit)'
/usr/bin/ld: /tmp/tvdemo.ecc3yZ.ltrans0.ltrans.o: in function `TReport::build()':
@magiblot
Copy link
Owner

Hi Pavel, thanks for giving this a try.

The only way for me to get that error is to set the NO_STREAMABLE macro definition at compile time. Could it be that you enabled it? For any particular reason? Or did you manipulate the nm*.cpp or s*.cpp files in source/tvision/?

Unfortunately, Turbo Vision does not support being built completely without streaming support. The library code is missing #if !defined(NO_STREAMABLE) guards in some places, but last time I tried to add them I got compilation errors.

The only reliable way to use NO_STREAMABLE at the moment is to define it only when compiling the applications. But since the CMakeLists.txt of this project is very badly written, you get the same compilation flags both when building the library and when building the applications.

@okbob
Copy link
Author

okbob commented Jul 21, 2020 via email

@magiblot
Copy link
Owner

Can you please run:

rm -r CMakeCache.txt CMakeFiles/
cmake . && make VERBOSE=1 &> build.log

And upload the resulting build.log file? (Note that nothing will be printed on screen during build)

@okbob
Copy link
Author

okbob commented Jul 21, 2020 via email

@magiblot
Copy link
Owner

magiblot commented Jul 21, 2020 via email

@okbob
Copy link
Author

okbob commented Jul 21, 2020

build.log

@okbob
Copy link
Author

okbob commented Jul 21, 2020 via email

@magiblot
Copy link
Owner

Thanks! I received it.

@magiblot
Copy link
Owner

magiblot commented Jul 21, 2020

/usr/bin/ar: CMakeFiles/tvision.dir/source/linux/ansidisp.cpp.o: plugin needed to handle lto object

Okay, it seems that the issue is LTO. Try removing -flto from CMakeLists.txt.

@okbob
Copy link
Author

okbob commented Jul 21, 2020

Now, it is working well. Thank you. Unfortunately UTF8 doesn't work, I tried display file with utf8 content, but any other is perfect

@okbob
Copy link
Author

okbob commented Jul 21, 2020

I remember I had to install libgpm-devel - it was not optional (it is maybe wrong in readme).

Missing UTF8 support is not related to this issue, so I close this issue. It is pretty fast and looks pretty well. Good work. Thank you for support.

@okbob okbob closed this as completed Jul 21, 2020
@magiblot
Copy link
Owner

Thanks. What error did you get before installing libgpm-devel? It is intended to be optional. Maybe it found the library but the headers were not installed. I'll have to change the CMakeLists.txt.

Regarding UTF-8, there are two separate issues:

  1. The Turbo Vision API doesn't allow multibyte I/O, although it would not be difficult to extend.
  2. Turbo Vision widgets do not support multibyte or wide char encodings, e.g. pressing the Left key in an input form or editor moves the cursor one byte, not one character.

For simplicity, I left things as they were. The most difficult to fix is point 2. With unicode-aware widgets, it would be pretty easy to display and write unicode text with minimal API changes.

@okbob
Copy link
Author

okbob commented Jul 21, 2020 via email

@magiblot
Copy link
Owner

magiblot commented Aug 7, 2020

Hi Pavel. In case you may be interested, I implemented Unicode support in Turbo Vision. It's documented in the project's Readme. I also wrote a small text editor which makes use of the Unicode capabilities of Turbo Vision.

Cheers.

@okbob
Copy link
Author

okbob commented Aug 8, 2020 via email

@okbob
Copy link
Author

okbob commented Aug 8, 2020 via email

@okbob
Copy link
Author

okbob commented Aug 8, 2020 via email

@magiblot
Copy link
Owner

magiblot commented Aug 8, 2020

I checked tvedit and tvdemo - it shows unicode well, but it doesn't allow
unicode chars

That's right. I am not sure adding Unicode support to TEditor is worth the effort. Tvedit should not be taken as a serious editor anyway--it has a single-step undo buffer (and no redo action) and lacks a lot of functionality. The only reason why anybody would use it is because of its vintage look-and-feel. In order to support Unicode in TEditor without severing performance, special data structures are necessary ("position caches" as named in Scintilla).

However, TEditor also provides functionality to TMemo, so its use cases go beyond Tvedit. That's the only reason I would add Unicode support eventually. But I do not intend to do that anytime soon.

On the other hand Tvdemo is very easy to fix. Unicode support there would be actually useful as example for other developers.

@okbob
Copy link
Author

okbob commented Aug 8, 2020 via email

@okbob
Copy link
Author

okbob commented Aug 9, 2020 via email

@magiblot
Copy link
Owner

magiblot commented Aug 9, 2020

I have also thought of that -- in addition, by making a clone of vim, I would probably learn the vim commands at last.

But I am not sure about the usability part: there already exist GUI applications for these editors--how could a TUI be any more user friendly than that?

Other people have talked about making a clone of VS Code--all these are good ideas. But it takes a lot of time. Personally I feel like I have already spent enough time on Turbo Vision and the Turbo editor. The tools are out there in case anybody wants to undertake these tasks.

@okbob
Copy link
Author

okbob commented Aug 9, 2020 via email

@magiblot
Copy link
Owner

Unicode support has been added to TEditor (and hence the tvedit application) and it can be toggled on the fly with Ctrl+P.

@okbob
Copy link
Author

okbob commented Aug 20, 2020 via email

@okbob
Copy link
Author

okbob commented Aug 20, 2020

I tested it, and it is working

@okbob
Copy link
Author

okbob commented Aug 20, 2020 via email

@magiblot
Copy link
Owner

Thanks for spreading the word 😄 .

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

2 participants