[code] [textadept] RPM package for Textadept

From: Brenton Horne <brentonhorne77.att.gmail.com>
Date: Thu, 19 Jan 2017 02:39:19 +1000

Hi,

I have been building a Textadept package for Linux distros using the RPM
package manager (like CentOS, Fedora, openSUSE, Red Hat Enterprise Linux
[RHEL], Scientific Linux [SL], SUSE Linux Enterprise [SLE]) using the Open
Build Service (OBS). For the files (like my spec file) I am using to build
these RPM package see my OBS textadept project
<https://build.opensuse.org/package/show/home:fusion809/textadept>. I am
sending this email for two main purposes: firstly, to inform yas of these
packages so you's can try them out yourself and make use of them. Secondly,
to ask for help fixing some build errors on CentOS, openSUSE, RHEL, SL and
SLE. On openSUSE Tumbleweed I am getting the error:

[ 357s] g++ -c -Os -std=c++0x -pedantic -DCURSES
-D_XOPEN_SOURCE_EXTENDED -DSCI_LEXER -DNDEBUG -DNO_CXX11_REGEX
-DSCI_OWNREGEX -Iscintilla/include -Iscintilla/src -Iscintilla/lexlib
-Itre/lib -Wall scintilla/term/ScintillaTerm.cxx -o ScintillaTerm.o
[ 359s] scintilla/term/ScintillaTerm.cxx: In member function 'virtual
void SurfaceImpl::AlphaRectangle(PRectangle, int, ColourDesired, int,
ColourDesired, int, int)':
[ 359s] scintilla/term/ScintillaTerm.cxx:77:30: error: invalid use of
incomplete type 'WINDOW {aka struct _win_st}'
[ 359s] #define wattrget(w, y, x) (w)->_line[(y)].text[(x)].attr
[ 359s] ^
[ 359s] scintilla/term/ScintillaTerm.cxx:372:22: note: in expansion
of macro 'wattrget'
[ 359s] attr_t attrs = wattrget(win, y, x);
[ 359s] ^~~~~~~~
[ 359s] In file included from scintilla/term/ScintillaTerm.h:8:0,
[ 359s] from scintilla/term/ScintillaTerm.cxx:50:
[ 359s] /usr/include/curses.h:384:16: note: forward declaration of
'WINDOW {aka struct _win_st}'
[ 359s] typedef struct _win_st WINDOW;
[ 359s] ^~~~~~~
[ 359s] scintilla/term/ScintillaTerm.cxx: In member function 'virtual
void SurfaceImpl::DrawTextTransparent(PRectangle, Font&, XYPOSITION,
const char*, int, ColourDesired)':
[ 359s] scintilla/term/ScintillaTerm.cxx:77:30: error: invalid use of
incomplete type 'WINDOW {aka struct _win_st}'
[ 359s] #define wattrget(w, y, x) (w)->_line[(y)].text[(x)].attr
[ 359s] ^
[ 359s] scintilla/term/ScintillaTerm.cxx:455:20: note: in expansion
of macro 'wattrget'
[ 359s] attr_t attrs = wattrget(win, (int)rc.top, (int)rc.left);
[ 359s] ^~~~~~~~
[ 359s] In file included from scintilla/term/ScintillaTerm.h:8:0,
[ 359s] from scintilla/term/ScintillaTerm.cxx:50:
[ 359s] /usr/include/curses.h:384:16: note: forward declaration of
'WINDOW {aka struct _win_st}'
[ 359s] typedef struct _win_st WINDOW;
[ 359s] ^~~~~~~
[ 359s] make: *** [Makefile:173: ScintillaTerm.o] Error 1
[ 359s] error: Bad exit status from /var/tmp/rpm-tmp.ImqNQw (%build)

Guessing it is related to how bleeding-edge openSUSE Tumbleweed is, as the
less bleeding-edge versions of openSUSE (like openSUSE Leap 42.1 and 42.2)
do not get the same error. Regardless of the cause, I am kind of stumped
with how to fix it. Any ideas? Guessing I am missing some sort of
dependency. On CentOS 5 I am getting the build error:

[ 45s] + make
[ 45s] g++ -c -Os -std=c++0x -pedantic -DGTK -DSCI_LEXER -DNDEBUG
-DNO_CXX11_REGEX -DSCI_OWNREGEX -Iscintilla/include -Iscintilla/src
-Iscintilla/lexlib -Itre/lib -Wall scintilla/src/AutoComplete.cxx -o
AutoComplete.o
[ 45s] cc1plus: error: unrecognized command line option "-std=c++0x"
[ 45s] make: *** [AutoComplete.o] Error 1

which I'm guessing is related to how old the GCC compiler is for CentOS 5.
Is there a workaround for this error or am I likely going to just have to
accept that I can't build a package for CentOS 5? On RHEL 6 I get the build
error:

[ 78s] g++ -c -Os -std=c++0x -pedantic -DGTK -DSCI_LEXER -DNDEBUG
-DNO_CXX11_REGEX -DSCI_OWNREGEX -Iscintilla/include -Iscintilla/src
-Iscintilla/lexlib -Itre/lib -Wall -pthread -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
scintilla/gtk/ScintillaGTK.cxx -o ScintillaGTK.o
[ 78s] scintilla/gtk/ScintillaGTK.cxx: In member function 'virtual
void ScintillaGTK::Finalise()':
[ 78s] scintilla/gtk/ScintillaGTK.cxx:664: error:
'gtk_accessible_set_widget' was not declared in this scope
[ 78s] make: *** [ScintillaGTK.o] Error 1
[ 78s] error: Bad exit status from /var/tmp/rpm-tmp.TMGpCU (%build)

guessing this isn't related to how old the GCC compiler is as building on
CentOS 6 (which uses the same GCC compiler version to my knowledge) goes
fine. Any ideas how I might fix this error?

openSUSE 42.1 and 42.2 are also causing me build problems, but they're more
related to the standards of openSUSE packages than they are to do with this
package specifically. See they require architecture-dependent files to *not*
be in /usr/share and textadept's default make install mechanism places
architecture-dependent libraries and binaries in /usr/share (specifically
/usr/share/textadept/modules/yaml/libyaml.so,
/usr/share/textadept/modules/yaml/libyaml64.so,
/usr/share/textadept/textadept, /usr/share/textadept/textadeptjit,
/usr/share/textadept/textadeptjit-curses,
/usr/share/textadept/textadept-curses). Is there a way to easily place them
in /usr/lib without the binaries in /usr/bin (i.e., /usr/bin/textadept)
becoming broken?

Thanks for your time,
Brenton

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 18 Jan 2017 - 11:39:19 EST

This archive was generated by hypermail 2.2.0 : Thu 19 Jan 2017 - 06:29:43 EST