magiblot / tvision

A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Other
2k stars 151 forks source link

The build of demo applications are broken on FC32 #9

Closed okbob closed 4 years ago

okbob commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

út 21. 7. 2020 v 9:59 odesílatel magiblot notifications@github.com napsal:

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.

I have fresh git repository. I didn't touch (or modify any file).

Just

cmake . make

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-661700378, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO46VDXYBOJUR4SSXUFLR4VDHPANCNFSM4PDGTZPA .

magiblot commented 4 years ago

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 commented 4 years ago

út 21. 7. 2020 v 10:33 odesílatel magiblot notifications@github.com napsal:

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)

Regards

Pavel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-661716702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO47AWAG4OQK2IJC3ATLR4VHFBANCNFSM4PDGTZPA .

magiblot commented 4 years ago

Sorry, I did not receive the file.


De: Pavel Stehule notifications@github.com Enviat el: dimarts, 21 de juliol de 2020 12:08 Per a: magiblot/tvision A/c: magiblot; Comment Tema: Re: [magiblot/tvision] The build of demo applications are broken on FC32 (#9)

út 21. 7. 2020 v 10:33 odesílatel magiblot notifications@github.com napsal:

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)

Regards

Pavel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-661716702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO47AWAG4OQK2IJC3ATLR4VHFBANCNFSM4PDGTZPA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/magiblot/tvision/issues/9#issuecomment-661765106, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6BAWMOEC3ZOUHIQHT4NILR4VSIVANCNFSM4PDGTZPA.

okbob commented 4 years ago

build.log

okbob commented 4 years ago

please check it again

út 21. 7. 2020 v 12:17 odesílatel magiblot notifications@github.com napsal:

Sorry, I did not receive the file.


De: Pavel Stehule notifications@github.com Enviat el: dimarts, 21 de juliol de 2020 12:08 Per a: magiblot/tvision A/c: magiblot; Comment Tema: Re: [magiblot/tvision] The build of demo applications are broken on FC32 (#9)

út 21. 7. 2020 v 10:33 odesílatel magiblot notifications@github.com napsal:

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)

Regards

Pavel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-661716702, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAEFO47AWAG4OQK2IJC3ATLR4VHFBANCNFSM4PDGTZPA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/magiblot/tvision/issues/9#issuecomment-661765106>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AE6BAWMOEC3ZOUHIQHT4NILR4VSIVANCNFSM4PDGTZPA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-661769563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO45HCHIBDEKIB4H2RU3R4VTMNANCNFSM4PDGTZPA .

magiblot commented 4 years ago

Thanks! I received it.

magiblot commented 4 years ago
/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 commented 4 years ago

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 commented 4 years ago

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.

magiblot commented 4 years ago

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 commented 4 years ago

út 21. 7. 2020 v 14:52 odesílatel magiblot notifications@github.com napsal:

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.

I am sorry, I was messy due to the last problem. I recheck compilation without libgpm-devel and it is working. I am sorry again.

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.

yes, it can be lot of work.

Regards

Pavel

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-661841085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO4ZMBZMFUZXVWRZ4XQTR4WFP5ANCNFSM4PDGTZPA .

magiblot commented 4 years ago

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 commented 4 years ago

so 8. 8. 2020 v 1:04 odesílatel magiblot notifications@github.com napsal:

Hi Pavel. In case you may be interested, I implemented Unicode support in Turbo Vision. It's documented in the project's Readme https://github.com/magiblot/tvision/blob/master/README.md. I also wrote a small text editor https://github.com/magiblot/turbo which makes use of the Unicode capabilities of Turbo Vision.

can be great. I'll check it.

Pavel

Cheers.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-670777361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO42UO7YBUGBJFBV4RGTR7SB7PANCNFSM4PDGTZPA .

okbob commented 4 years ago

Hi

so 8. 8. 2020 v 7:10 odesílatel Pavel Stehule pavel.stehule@gmail.com napsal:

so 8. 8. 2020 v 1:04 odesílatel magiblot notifications@github.com napsal:

Hi Pavel. In case you may be interested, I implemented Unicode support in Turbo Vision. It's documented in the project's Readme https://github.com/magiblot/tvision/blob/master/README.md. I also wrote a small text editor https://github.com/magiblot/turbo which makes use of the Unicode capabilities of Turbo Vision.

can be great. I'll check it.

I tested it. And it is working pretty well. Good work!

Regards

Pavel

Pavel

Cheers.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-670777361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO42UO7YBUGBJFBV4RGTR7SB7PANCNFSM4PDGTZPA .

okbob commented 4 years ago

so 8. 8. 2020 v 7:47 odesílatel Pavel Stehule pavel.stehule@gmail.com napsal:

Hi

so 8. 8. 2020 v 7:10 odesílatel Pavel Stehule pavel.stehule@gmail.com napsal:

so 8. 8. 2020 v 1:04 odesílatel magiblot notifications@github.com napsal:

Hi Pavel. In case you may be interested, I implemented Unicode support in Turbo Vision. It's documented in the project's Readme https://github.com/magiblot/tvision/blob/master/README.md. I also wrote a small text editor https://github.com/magiblot/turbo which makes use of the Unicode capabilities of Turbo Vision.

can be great. I'll check it.

I tested it. And it is working pretty well. Good work!

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

turbo editor is working without problems

Regards

Pavel

Pavel

Cheers.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-670777361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO42UO7YBUGBJFBV4RGTR7SB7PANCNFSM4PDGTZPA .

magiblot commented 4 years ago

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 commented 4 years ago

so 8. 8. 2020 v 21:11 odesílatel magiblot notifications@github.com napsal:

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.

ok, understand.

still it is good work

Pavel

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-670963479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO46ZDP4N7SGKH6LKGNTR7WPNNANCNFSM4PDGTZPA .

okbob commented 4 years ago

so 8. 8. 2020 v 21:16 odesílatel Pavel Stehule pavel.stehule@gmail.com napsal:

so 8. 8. 2020 v 21:11 odesílatel magiblot notifications@github.com napsal:

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.

ok, understand.

still it is good work

you can try to port new vim or emacs to tvision :) - it can be a super bomb to have these editors with user friendly and nice UI.

More seriously - probably integration of neovim should not be too hard.

Pavel

Pavel

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-670963479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO46ZDP4N7SGKH6LKGNTR7WPNNANCNFSM4PDGTZPA .

magiblot commented 4 years ago

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 commented 4 years ago

ne 9. 8. 2020 v 10:56 odesílatel magiblot notifications@github.com napsal:

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?

The TUI for emacs is pretty ugly - there is no TUI with a good look.

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.

I understand it well. It was a little bit of a joke from me, but if you design editor based on scintilla, then maybe you can use neovim - it is similar to the editor framework, but it is much more popular I think. On second hand, I understand very well how much time it takes, and how much time needs a change of some basic component.

Regards

Pavel

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-671026291, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO4YGQALXRU4DXOTX3YTR7ZQE3ANCNFSM4PDGTZPA .

magiblot commented 4 years ago

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

okbob commented 4 years ago

čt 20. 8. 2020 v 4:21 odesílatel magiblot notifications@github.com napsal:

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

It is great! Thank You

Pavel

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-676856483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO45ORTH7TLM4OJ5SIFLSBSCDXANCNFSM4PDGTZPA .

okbob commented 4 years ago

I tested it, and it is working

okbob commented 4 years ago

čt 20. 8. 2020 v 5:03 odesílatel Pavel Stehule pavel.stehule@gmail.com napsal:

čt 20. 8. 2020 v 4:21 odesílatel magiblot notifications@github.com napsal:

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

It is great! Thank You

https://okbob.blogspot.com/2020/08/turbo-vision-for-terminals.html

Pavel

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/magiblot/tvision/issues/9#issuecomment-676856483, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO45ORTH7TLM4OJ5SIFLSBSCDXANCNFSM4PDGTZPA .

magiblot commented 4 years ago

Thanks for spreading the word 😄 .