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

Can't compile nightly on current Ubuntu LTS #286

Closed
paaguti opened this issue Oct 25, 2022 · 6 comments
Closed

Can't compile nightly on current Ubuntu LTS #286

paaguti opened this issue Oct 25, 2022 · 6 comments

Comments

@paaguti
Copy link

paaguti commented Oct 25, 2022

Hi,

on a VM:

student@juju:~/textadept$ uname -a
Linux juju 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I get the following compilation error:

-latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -ldl
/usr/bin/ld: textadept_gtk.o:(.bss+0x48): multiple definition of `command_entry'; textadept.o:(.bss+0x50): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x0): multiple definition of `lua'; textadept.o:(.bss+0x8): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x50): multiple definition of `focused_view'; textadept.o:(.bss+0x58): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x30): multiple definition of `replace'; textadept.o:(.bss+0x38): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x40): multiple definition of `find_next'; textadept.o:(.bss+0x48): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x28): multiple definition of `replace_all'; textadept.o:(.bss+0x30): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x38): multiple definition of `find_prev'; textadept.o:(.bss+0x40): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x20): multiple definition of `match_case'; textadept.o:(.bss+0x28): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x18): multiple definition of `whole_word'; textadept.o:(.bss+0x20): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x10): multiple definition of `regex'; textadept.o:(.bss+0x18): first defined here
/usr/bin/ld: textadept_gtk.o:(.bss+0x8): multiple definition of `in_files'; textadept.o:(.bss+0x10): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:235: ../textadept] Error 1

after I clone and compile with:

git clone https://github.com/orbitalquark/textadept.git
cd textadept/
make -C src deps NIGHTLY=1
make -C src

I have installed the dependencies as follows:

sudo apt update
sudo apt install libgtk-3-dev libgtkmm-3.0-dev 
sudo apt install make gcc g++ libncursesw5-dev unzip

The full offending command is

g++ -Os -std=c++17 -o ../textadept textadept.o AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o CellBuffer.o ChangeHistory.o CharClassify.o CharacterCategoryMap.o CharacterType.o ContractionState.o DBCS.o Decoration.o Document.o EditModel.o EditView.o Editor.o Geometry.o Indicator.o KeyMap.o LineMarker.o MarginView.o PerLine.o PositionCache.o RESearch.o RunStyles.o ScintillaBase.o Selection.o Style.o UniConversion.o UniqueString.o ViewStyle.o XPM.o Accessor.o CharacterCategory.o CharacterSet.o DefaultLexer.o LexerBase.o LexerModule.o LexerNoExceptions.o LexerSimple.o PropSetSimple.o StyleContext.o WordList.o Scintillua.o lapi.o lauxlib.o lbaselib.o lcode.o lcorolib.o lctype.o ldblib.o ldebug.o ldo.o ldump.o lfunc.o lgc.o linit.o liolib.o llex.o lmathlib.o lmem.o loadlib.o lobject.o lopcodes.o loslib.o lparser.o lstate.o lstring.o lstrlib.o ltable.o ltablib.o ltm.o lundump.o lutf8lib.o lvm.o lzio.o lfs.o lpcap.o lpcode.o lpprint.o lptree.o lpvm.o textadept_gtk.o PlatGTK.o ScintillaGTK.o ScintillaGTKAccessible.o scintilla-marshal.o -rdynamic -Wl,--retain-symbols-file -Wl,/home/student/textadept/src/lua.sym -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -ldl

This doesn't happen on a Ubuntu 20.04LTS VM (or Docker image)

@orbitalquark
Copy link
Owner

orbitalquark commented Oct 25, 2022 via email

@paaguti
Copy link
Author

paaguti commented Oct 26, 2022

Fixed for the gtk compile process, for Ubuntu jammy and Kali Linux rolling. Now facing problems with the curses version

In file included from scintilla/curses/PlatCurses.cxx:25:
scintilla/src/Platform.h:312:14: error: 'optional' in namespace 'std' does not name a template type
  312 |         std::optional<ColourRGBA> fore;
      |              ^~~~~~~~
scintilla/src/Platform.h:1:1: note: 'std::optional' is defined in header '<optional>'; did you forget to '#include <optional>'?
  +++ |+#include <optional>

will report after more in-depth analysis

@orbitalquark
Copy link
Owner

orbitalquark commented Oct 26, 2022 via email

@paaguti
Copy link
Author

paaguti commented Oct 26, 2022 via email

@kbarni
Copy link

kbarni commented Nov 7, 2022

Had the same problem.

Other than adding #include <optional> in PlatCurses.cxx and ScintillaCurses.cxx, I also had to include <stdexcept> in scintilla/src/Document.h. It is needed by std::runtime_error in line 204.

Now it builds without other errors.

@orbitalquark
Copy link
Owner

orbitalquark commented Nov 9, 2022 via email

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

3 participants