Mogan v1.1.2 Roadmap

I am not sure whether it is blamed purely out of extra functionalities, its cumbersomeness due to that, or the monopoly out of that. The last is similar to Microsoft including Internet Explorer in Windows, which might lead to a company controlling everything of its users, including (abuse) of privacy. There is the KISS principle in the Unix world, but general users do not seem to care about that.

Emacs has many functionalities but it seems to be less blamed for that.

2 Likes

I do not like the Emacs way. I love the KISS principle. That’s why I want to release Mogan Code.

And I do not like Wechat Pay. I prefer Alipay. I do not like shopping on Wechat, I prefer Taobao/JD/Pingduoduo.

1 Like

Having the possibility of loading files on the webasm port could be great. Let me explain to you what I have in mind as long term goals: all is related to UI cannot be easily done with wasm since the marshalling of objects and the handling of DOM are not directly supported. You have to do it via javascript. So the idea is to have a UI client code written in javascript which interact with the browser and the user and on a different thread a worker server which implements the TeXmacs document format and typeset it to bitmaps which are sent back to the browser for visualisation. One can improve the protocol to allow local refresh. To have an idea of the kind of architecture I’m taking about one can look at the mupdf wasm viewer demo here: https://mupdf.com/wasm/demo/view.html?file=../../docs/mupdf_explored.pdf

which is structured as I described above.

Also: I have a working branch of TeXmacs which uses mupdf for onscreen reddening, so that it is independent of Qt graphics libraries. This is part of the above effort to make a small core with TeXmacs+mupdf+s7 which can render documents without needing large frameworks.

3 Likes

Mogan is a non-profit project. As the original author of Mogan, I just wanna to do what I want to do. That’s my long-term plan. If you do not like Mogan XYZ, just ignore it and stick to GNU TeXmacs or Mogan.

There are principles and philosophies. I care less on those things, I just want to make tools for myself.

If other developers agree with me, they could join me on Mogan Code development. That’s all!

IMHO for that we also need to make it easier for people to contribute.

A good step would be making resources easier to find; this could encourage people to improve on an existing plugin or write their own.

I see the following:

tm-forge and blog

  • put a link on TeXmacs website and a link on the forum, (in the forum the link should be pinned both for guests and logged-in users)

further:

  • for tm-forge, a different organization so that it is easier to find out what it is there and to download it

Other things that would IMHO encourage people to contribute:

  • again for plugin development, indicate on the website a way to publish and advertise plugins without being part of the team; on http://www.texmacs.org/tmweb/contribute/develop.en.html there is an invitation to join the team, but this might be too big of a commitment for some people

for the forum:

2 Likes

Have you ever tried Mogan?

Planet in Mogan could be viewed in Mogan itself, without opening web browsers.

@mgubi Are you interested to merge tm-forge/blog/planet into one planet?

A planet:

  • Community Driven
  • Could be viewed within GNU TeXmacs or Mogan
  • Could be viewed in Web Browsers

I think some resources in tm-forge should be maintained as a plugin. And I’m planning to start the plugin center in Mogan v1.1.3.

2 Likes

I tried a previous version. Maybe at that time it was almost the same as TeXmacs. Let me try it again.

Do I have to compile it for Ubuntu?

Yes. https://mogan.app/guide/Develop_on_Linux.html

The build process is very smoothy. Hope you try it and open the XmacsLabs Planet via Help->Planet.

1 Like

Please remember that the documents under Help → Planet are primarily written in Chinese.

1 Like

Thanks.
Two questions

I am using xmake:

c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files

what to do?

  1. How do I compile with many processors?

Please describe in detail how you get this fatal error.

Issuing xmake.

Here is the output of xmake:

note: CMakeLists.txt found, try building it or you can run `xmake f --trybuild=` to set buildsystem (pass -y or --confirm=y/n/d to skip confirm)?
please input: y (y/n)

checking for platform ... linux
checking for architecture ... x86_64
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- Found Iconv: built in to C library  
-- Found SQLite3: /usr/include (found version "3.39.3") 
-- Found Freetype: /usr/local/lib/libfreetype.so (found version "2.10.0") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of FILE
-- Check size of FILE - failed
-- Check size of intptr_t
-- Check size of intptr_t - done
-- Check size of time_t
-- Check size of time_t - done
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for X11/Xlib.h
-- Looking for X11/Xlib.h - found
-- Looking for X11/Xutil.h
-- Looking for X11/Xutil.h - found
-- Looking for pty.h
-- Looking for pty.h - found
-- Looking for util.h
-- Looking for util.h - not found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Check size of void*
-- Check size of void* - done
-- Check if we are on a 64-bits computer
-- final adjustments for an Intel or AMD GNU/Linux host
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.38") 
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "80") 
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.85.0")  
-- Found Qt: 5
-- Enabling Qt port
-- TeXmacs_LibrariesPNG::PNGZLIB::ZLIBJPEG::JPEGCURL::libcurlIconv::Iconv-lpthreadSQLite::SQLite3Freetype::FreetypeQt5::CoreQt5::GuiQt5::WidgetsQt5::PrintSupportQt5::Svg
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_LIBDIR


-- Build files have been written to: /home/giovanni/Software/Other programs/Mogan/mogan-1.1.1/build
[  1%] Building mogan man page
[  1%] Automatic MOC for target texmacs_body
[  1%] Automatic MOC for target tm_shell
[  1%] Built target mogan.1
[  1%] Built target tm_shell_autogen
[  1%] Building CXX object plugins/shell/CMakeFiles/tm_shell.dir/src/tm_shell.cpp.o
[  1%] Building CXX object plugins/shell/CMakeFiles/tm_shell.dir/tm_shell_autogen/mocs_compilation.cpp.o
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [plugins/shell/CMakeFiles/tm_shell.dir/build.make:76: plugins/shell/CMakeFiles/tm_shell.dir/tm_shell_autogen/mocs_compilation.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [plugins/shell/CMakeFiles/tm_shell.dir/build.make:90: plugins/shell/CMakeFiles/tm_shell.dir/src/tm_shell.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:277: plugins/shell/CMakeFiles/tm_shell.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Built target texmacs_body_autogen
make: *** [Makefile:136: all] Error 2
error: execv(make -j10) failed(2)
giovanni@CELSIUS:mogan-1.1.1$ xmake
[  1%] Automatic MOC for target tm_shell
[  1%] Built target mogan.1
[  1%] Automatic MOC for target texmacs_body
[  1%] Built target tm_shell_autogen
[  1%] Built target texmacs_body_autogen
[  1%] Building CXX object plugins/shell/CMakeFiles/tm_shell.dir/tm_shell_autogen/mocs_compilation.cpp.o
[  1%] Building CXX object plugins/shell/CMakeFiles/tm_shell.dir/src/tm_shell.cpp.o
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [plugins/shell/CMakeFiles/tm_shell.dir/build.make:76: plugins/shell/CMakeFiles/tm_shell.dir/tm_shell_autogen/mocs_compilation.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [plugins/shell/CMakeFiles/tm_shell.dir/build.make:90: plugins/shell/CMakeFiles/tm_shell.dir/src/tm_shell.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:277: plugins/shell/CMakeFiles/tm_shell.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/BibTeX/conservative_bib.cpp.o
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/generic.cpp.o
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/texmacs_body_autogen/mocs_compilation.cpp.o
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/BibTeX/parsebib.cpp.o
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/input.cpp.o
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/indexation.cpp.o
[  2%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Scheme/from_scheme.cpp.o
[  3%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/post_convert.cpp.o
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
compilation terminated.
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:90: src/CMakeFiles/texmacs_body.dir/Data/Convert/BibTeX/conservative_bib.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:104: src/CMakeFiles/texmacs_body.dir/Data/Convert/BibTeX/parsebib.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:76: src/CMakeFiles/texmacs_body.dir/texmacs_body_autogen/mocs_compilation.cpp.o] Error 1
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:118: src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/generic.cpp.o] Error 1
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:132: src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/indexation.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:160: src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/post_convert.cpp.o] Error 1
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:146: src/CMakeFiles/texmacs_body.dir/Data/Convert/Generic/input.cpp.o] Error 1
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:174: src/CMakeFiles/texmacs_body.dir/Data/Convert/Scheme/from_scheme.cpp.o] Error 1
[  3%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Scheme/to_scheme.cpp.o
[  3%] Building CXX object src/CMakeFiles/texmacs_body.dir/Data/Convert/Tex/conservative_fromtex.cpp.o
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:188: src/CMakeFiles/texmacs_body.dir/Data/Convert/Scheme/to_scheme.cpp.o] Error 1
c++: fatal error: cannot specify ‘-o’ with ‘-c’, ‘-S’ or ‘-E’ with multiple files
compilation terminated.
make[2]: *** [src/CMakeFiles/texmacs_body.dir/build.make:202: src/CMakeFiles/texmacs_body.dir/Data/Convert/Tex/conservative_fromtex.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:172: src/CMakeFiles/texmacs_body.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
error: execv(make -j10) failed(2)

Solution 1

Try input n? Mogan prefers xmake rather than cmake.

It seems there is a compatible mode for cmake in xmake. Please do not use cmake.

Solution 2

          xmake build --yes --verbose --diagnosis --jobs=8 --all

Solution 3: wait me to improve the dev guide

1 Like

This fails in the following way:

note: CMakeLists.txt found, try building it or you can run `xmake f --trybuild=` to set buildsystem (pass -y or --confirm=y/n/d to skip confirm)?
please input: y (y/n)
n
note: xmake.lua not found, try generating it (pass -y or --confirm=y/n/d to skip confirm)?
please input: n (y/n)
y
xmake.lua not found, scanning files ..
error: project not found!

This makes more progress, and stops at

[  1%] Built target texmacs_body_autogen
make[1]: Leaving directory '/home/giovanni/Software/Other programs/Mogan/mogan-1.1.1/build'
make: *** [Makefile:139: all] Error 2
error: @programdir/core/main.lua:280: @programdir/core/sandbox/modules/os.lua:372: execv(make -j8 VERBOSE=1) failed(2)
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:897]:
    [@programdir/core/sandbox/modules/os.lua:372]:
    [@programdir/modules/private/action/trybuild/cmake.lua:299]: in function 'build'
    [@programdir/actions/build/main.lua:45]: in function '_do_try_build'
    [@programdir/actions/build/main.lua:81]: in function '_try_build'
    [@programdir/actions/build/main.lua:116]:
    [C]: in function 'xpcall'
    [@programdir/core/base/utils.lua:280]:
    [@programdir/core/base/task.lua:501]: in function 'run'
    [@programdir/core/main.lua:278]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:404]:

stack traceback:
	[C]: in function 'error'
	@programdir/core/base/os.lua:897: in function 'os.raiselevel'
	(...tail calls...)
	@programdir/core/main.lua:280: in upvalue 'cotask'
	@programdir/core/base/scheduler.lua:404: in function <@programdir/core/base/scheduler.lua:397>

just use xmake in the root dir (do not enter the build dir), like

git clone xxx
cd mogan
xmake

or

git clone xxx
cd mogan
xmake build --yes --verbose --diagnosis --jobs=8 --all

You can always learn from CI yaml file: https://gitee.com/XmacsLabs/mogan/blob/main/.github/workflows/ci-xmake.yaml#L108-141

I had issued xmake in the root dir, but starting from the release at https://github.com/XmacsLabs/mogan/releases/tag/v1.1.1

Now starting by cloning the code at the repository at https://github.com/XmacsLabs/mogan the compilation succeeds and the unit tests are ok.

The program crashes at startup, it looks like it does not like something about my TeXmacs installation. I will investigate more later.

—It is easier than compiling TeXmacs, which I never could do :wink:

I do have one more question in the meantime. As a first step in the compilation, xmake made me install the following:

note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> libpng v1.6.37 
  -> libiconv 1.17 
  -> libjpeg v9e 
  -> libcurl 7.84.0 
  -> freetype 2.12.1 
  -> sqlite3 3.39.0+200 

Is this going to interfere with packages with the same name installed with apt?

Ok, made it, I had first to issue

export TEXMACS_PATH=

It looks nice. I like the icons.
Of course now I have to learn Chinese to read XmacsLabs Planet :wink:

BTW I still would appreciate some info about the packages that xmake installed (see message above).

2 Likes

No. All these dependencies are installed in $HOME/.xmake, it is in user space and only visible to xmake.