Re: [code] [textadept] RPM package for Textadept

From: Brenton Horne <brentonhorne77.att.gmail.com>
Date: Fri, 20 Jan 2017 02:37:23 +1000

Yep my build under openSUSE Tumbleweed uses ncurses 6.0 so it's possible
you're right about why that error occurred. My RHEL 6 build machine was
using GTK 2.20, reverting to Textadept 9.0 causes the build fail with the
error:

go-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/inclu
de/freetype2 -I/usr/include/libpng12 textadept.c -o textadept.o
[ 158s] textadept.c:292: error: expected ')' before '*' token
[ 158s] textadept.c: In function 'main':
[ 158s] textadept.c:2513: error: 'GApplication' undeclared (first use in
this function)
[ 158s] textadept.c:2513: error: (Each undeclared identifier is reported
only once
[ 158s] textadept.c:2513: error: for each function it appears in.)
[ 158s] textadept.c:2513: error: 'app' undeclared (first use in this
function)
[ 158s] textadept.c:2513: warning: implicit declaration of function
'g_application_new'
[ 158s] textadept.c:2514: error: 'G_APPLICATION_HANDLES_COMMAND_LINE'
undeclared (first use in t
his function)
[ 158s] textadept.c:2515: error: 'a_command_line' undeclared (first use in
this function)
[ 158s] textadept.c:2516: warning: implicit declaration of function
'g_application_register'
[ 158s] textadept.c:2517: warning: implicit declaration of function
'g_application_get_is_remote
'
[ 158s] textadept.c:2534: warning: implicit declaration of function
'g_application_run'
[ 158s] make: *** [textadept.o] Error 1
[ 158s] error: Bad exit status from /var/tmp/rpm-tmp.6Ob584 (%build)
[ 158s]

not sure if the GCC under CentOS 5 supports C++ 0x, but it is version 4.1.2.

On 20 January 2017 at 00:26, Mitchell <m.att.foicica.com> wrote:

> Hi Brenton,
>
> On Thu, 19 Jan 2017, Brenton Horne wrote:
>
> 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
>>
>
> First of all, I admire your efforts!
>
> <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.
>>
>
> What version of ncurses are you compiling against? I've only tested with
> 5.7 and 5.9. I'm not sure it will work with 6.x.
>
> 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?
>>
>
> I think the Scintilla component requires c++0x support. What is the latest
> standard your C++ compiler supports? You may be able to try patching to use
> that and see what happens.
>
> 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?
>>
>
> This is a GTK versioning issue. It appears some recently added GTK
> accessibility code has bumped up the minimum GTK version to 2.22, which may
> be too recent for old Linuxen. What version do you have? If it's <2.22, try
> compiling Textadept 9.0. If that works, I'll look into adding a compile
> option to disable the 2.22-specific behavior.
>
> 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?
>>
>
> You can put everything in /usr/lib if you want, and then symlink the
> binaries to /usr/bin. Textadept's home folder can be anything, really.
>
> Cheers,
> Mitchell
> --
> 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.
>
>

-- 
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 Thu 19 Jan 2017 - 11:37:23 EST

This archive was generated by hypermail 2.2.0 : Fri 20 Jan 2017 - 06:43:59 EST