Re: [gtk-osx-users] cannot build core libraries

2019-03-05 Thread v...@myridia.com
yes it works on my hackintosh 10.12

on my hackingtosh 10.14(latest) i needed to install the xml2 c headers to
/usr/include via this command line:

sudo installer -pkg
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
-target /

than after pip3 the libxml3-python3 module i could go on go on with
jhbuild build..

reason:
Mac OS X 10.14 has stopped placing the include libraries in their usual
location, /usr/include, keeping them only inside the XCode directory.

https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave/

> *** Success  ***
> thanks a lot,
>
> can i donate to the dev what my find time to fix this bug.
>
>
> On Wed, March 6, 2019 11:25 am, John Ralls wrote:
>
>> Please remember to copy the list on all replies.
>>
>>
>>
>> Ah, yes, that's a long-standing python bug. You need to edit
>> $PREFIX/lib/python3.6/_sysconfigdata_m_darwin_darwin.py:
>> --- _sysconfigdata_m_darwin_darwin.py~   2018-11-03 10:18:50.0
>> -0700
>> +++ _sysconfigdata_m_darwin_darwin.py2018-11-03 11:29:09.0
>> -0700
>> @@ -608,7 +608,7 @@
>> 'LIBS': '-lintl -ldl  -framework CoreFoundation',
>> 'LIBSUBDIRS': 'tkinter tkinter/test tkinter/test/test_tkinter \\',
>> 'LINKCC': '/Applications/Xcode.app/Contents/Developer/usr/bin/gcc',
>> - 'LINKFORSHARED': '-Wl,-stack_size,100  -framework CoreFoundation',
>>  + 'LINKFORSHARED': '-framework CoreFoundation',
>> 'LIPO_32BIT_FLAGS': '',
>> 'LLVM_PROF_ERR': 'no',
>> 'LLVM_PROF_FILE': 'LLVM_PROFILE_FILE="code-%p.profclangr"',
>>
>>
>>
>> The issue being that -stack_size is only for executables, not for
>> shared libraries.
>>
>> Regards,
>> John Ralls
>>
>>
>>
>>
>>> On Mar 5, 2019, at 3:37 PM, veto  wrote:
>>>
>>>
>>>
>>> I cannot build meta-gtk-osx-bootstrap, it stuck with libxml2
>>>
>>>
>>>
>>>
>>>
>>> make[4]: Entering directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/python'
>>> CC   libxml.lo
>>> CC   libxml2-py.lo
>>> CC   types.lo
>>> CCLD libxml2mod.la
>>> ld: -stack_size option can only be used when linking a main executable
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Here is the full build log:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *** Building libxml2 *** [1/1]
>>> make -j 9 make  all-recursive make[1]: Entering directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8'
>>> Making all in include
>>> make[2]: Entering directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>>> Making all in libxml
>>> make[3]: Entering directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/include/libxml'
>>> make[3]: Nothing to be done for 'all'.
>>> make[3]: Leaving directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/include/libxml'
>>> make[3]: Entering directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>>> make[3]: Nothing to be done for 'all-am'.
>>> make[3]: Leaving directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>>> make[2]: Leaving directory
>>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>>> Making all in .
>>> make[2]: Entering directory '/Users/veto/gtk/source/libxml2-2.9.8'
>>> sed -e 's?\@XML_LIBDIR\@?-L/Users/veto/gtk/inst/lib?g' \ -e
>>> 's?\@XML_INCLUDEDIR\@?-I/Users/veto/gtk/inst/include/libxml2?g' \
>>> -e 's?\@VERSION\@?2.9.8?g' \
>>> -e 's?\@XML_LIBS\@?-lxml2 -L/Users/veto/gtk/inst/lib -lz
>>> -L/Users/veto/gtk/inst/lib -llzma -lpthread  -liconv  -lm ?g' \
>>> < ./xml2Conf.sh.in > xml2Conf.tmp \
>>> && mv xml2Conf.tmp xml2Conf.sh
>>> CC   SAX.lo
>>> CC   entities.lo
>>> CC   error.lo
>>> CC   encoding.lo
>>> CC   parserInternals.lo
>>> CC   parser.lo
>>> CC   tree.lo
>>> CC   hash.lo
>>> CC   list.lo
>>> encoding.c:500:26: warning: cast from 'const unsigned char *' to
>>> 'unsigned short *' increases required alignment from 1 to 2
>>> [-Wcast-align]
>>> unsigned short* in = (unsigned short*) inb; ^
>>> encoding.c:582:27: warning: cast from 'unsigned char *' to 'unsigned
>>> short *' increases required alignment from 1 to 2 [-Wcast-align]
>>> unsigned short* out = (unsigned short*) outb; ^~
>>> encoding.c:738:26: warning: cast from 'const unsigned char *' to
>>> 'unsigned short *' increases required alignment from 1 to 2
>>> [-Wcast-align]
>>> unsigned short* in = (unsigned short*) inb; ^
>>> encoding.c:824:27: warning: cast from 'unsigned char *' to 'unsigned
>>> short *' increases required alignment from 1 to 2 [-Wcast-align]
>>> unsigned short* out = (unsigned short*) outb; ^~ 4
>>> warnings generated. CC   xmlIO.lo
>>> CC   xmlmemory.lo
>>> CC   uri.lo
>>> CC   valid.lo
>>> CC   xlink.lo
>>> CC   HTMLparser.lo
>>> CC   HTMLtree.lo
>>> CC   debugXML.lo
>>> CC   xpath.lo
>>> CC   xpointer.lo
>>> CC   xinclude.lo
>>> CC   nanohttp.lo
>>> CC   nanoftp.lo
>>> CC   catalog.lo
>>> CC   globals.lo
>>> CC   threads.lo
>>> CC   c14n.lo
>>> 

Re: [gtk-osx-users] cannot build core libraries

2019-03-05 Thread v...@myridia.com
*** Success  ***
thanks a lot,

can i donate to the dev what my find time to fix this bug.


On Wed, March 6, 2019 11:25 am, John Ralls wrote:
> Please remember to copy the list on all replies.
>
>
> Ah, yes, that's a long-standing python bug. You need to edit
> $PREFIX/lib/python3.6/_sysconfigdata_m_darwin_darwin.py:
> --- _sysconfigdata_m_darwin_darwin.py~2018-11-03 10:18:50.0 
> -0700
>  +++ _sysconfigdata_m_darwin_darwin.py2018-11-03 11:29:09.0
> -0700
> @@ -608,7 +608,7 @@
> 'LIBS': '-lintl -ldl  -framework CoreFoundation',
> 'LIBSUBDIRS': 'tkinter tkinter/test tkinter/test/test_tkinter \\',
> 'LINKCC': '/Applications/Xcode.app/Contents/Developer/usr/bin/gcc',
> - 'LINKFORSHARED': '-Wl,-stack_size,100  -framework CoreFoundation',
> + 'LINKFORSHARED': '-framework CoreFoundation',
> 'LIPO_32BIT_FLAGS': '',
> 'LLVM_PROF_ERR': 'no',
> 'LLVM_PROF_FILE': 'LLVM_PROFILE_FILE="code-%p.profclangr"',
>
>
> The issue being that -stack_size is only for executables, not for shared
> libraries.
>
> Regards,
> John Ralls
>
>
>
>> On Mar 5, 2019, at 3:37 PM, veto  wrote:
>>
>>
>> I cannot build meta-gtk-osx-bootstrap, it stuck with libxml2
>>
>>
>>
>>
>> make[4]: Entering directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/python'
>> CC   libxml.lo
>> CC   libxml2-py.lo
>> CC   types.lo
>> CCLD libxml2mod.la
>> ld: -stack_size option can only be used when linking a main executable
>>
>>
>>
>>
>>
>>
>> Here is the full build log:
>>
>>
>>
>>
>>
>>
>>
>> *** Building libxml2 *** [1/1]
>> make -j 9 make  all-recursive make[1]: Entering directory
>> '/Users/veto/gtk/source/libxml2-2.9.8'
>> Making all in include
>> make[2]: Entering directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>> Making all in libxml
>> make[3]: Entering directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/include/libxml'
>> make[3]: Nothing to be done for 'all'.
>> make[3]: Leaving directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/include/libxml'
>> make[3]: Entering directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>> make[3]: Nothing to be done for 'all-am'.
>> make[3]: Leaving directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>> make[2]: Leaving directory
>> '/Users/veto/gtk/source/libxml2-2.9.8/include'
>> Making all in .
>> make[2]: Entering directory '/Users/veto/gtk/source/libxml2-2.9.8'
>> sed -e 's?\@XML_LIBDIR\@?-L/Users/veto/gtk/inst/lib?g' \ -e
>> 's?\@XML_INCLUDEDIR\@?-I/Users/veto/gtk/inst/include/libxml2?g' \
>> -e 's?\@VERSION\@?2.9.8?g' \
>> -e 's?\@XML_LIBS\@?-lxml2 -L/Users/veto/gtk/inst/lib -lz
>> -L/Users/veto/gtk/inst/lib -llzma -lpthread  -liconv  -lm ?g' \
>> < ./xml2Conf.sh.in > xml2Conf.tmp \
>> && mv xml2Conf.tmp xml2Conf.sh
>> CC   SAX.lo
>> CC   entities.lo
>> CC   error.lo
>> CC   encoding.lo
>> CC   parserInternals.lo
>> CC   parser.lo
>> CC   tree.lo
>> CC   hash.lo
>> CC   list.lo
>> encoding.c:500:26: warning: cast from 'const unsigned char *' to
>> 'unsigned short *' increases required alignment from 1 to 2
>> [-Wcast-align]
>> unsigned short* in = (unsigned short*) inb; ^
>> encoding.c:582:27: warning: cast from 'unsigned char *' to 'unsigned
>> short *' increases required alignment from 1 to 2 [-Wcast-align]
>> unsigned short* out = (unsigned short*) outb; ^~
>> encoding.c:738:26: warning: cast from 'const unsigned char *' to
>> 'unsigned short *' increases required alignment from 1 to 2
>> [-Wcast-align]
>> unsigned short* in = (unsigned short*) inb; ^
>> encoding.c:824:27: warning: cast from 'unsigned char *' to 'unsigned
>> short *' increases required alignment from 1 to 2 [-Wcast-align]
>> unsigned short* out = (unsigned short*) outb; ^~
>> 4 warnings generated.
>> CC   xmlIO.lo
>> CC   xmlmemory.lo
>> CC   uri.lo
>> CC   valid.lo
>> CC   xlink.lo
>> CC   HTMLparser.lo
>> CC   HTMLtree.lo
>> CC   debugXML.lo
>> CC   xpath.lo
>> CC   xpointer.lo
>> CC   xinclude.lo
>> CC   nanohttp.lo
>> CC   nanoftp.lo
>> CC   catalog.lo
>> CC   globals.lo
>> CC   threads.lo
>> CC   c14n.lo
>> CC   xmlstring.lo
>> CC   buf.lo
>> CC   xmlregexp.lo
>> CC   xmlschemas.lo
>> CC   xmlschemastypes.lo
>> CC   xmlunicode.lo
>> CC   xmlreader.lo
>> CC   relaxng.lo
>> CC   dict.lo
>> CC   SAX2.lo
>> CC   xmlwriter.lo
>> CC   legacy.lo
>> CC   chvalid.lo
>> CC   pattern.lo
>> CC   xmlsave.lo
>> CC   xmlmodule.lo
>> CC   schematron.lo
>> CC   xzlib.lo
>> CC   xmllint.o
>> CC   xmlcatalog.o
>> CCLD libxml2.la
>> CCLD xmllint
>> CCLD xmlcatalog
>> make[2]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8'
>> Making all in doc
>> make[2]: Entering directory '/Users/veto/gtk/source/libxml2-2.9.8/doc'
>> Making all in .
>> make[3]: Entering directory 

Re: Closing XTerm causes the GTK app to exit, inspite of disown/nohup on its PID - why?

2019-03-05 Thread James Cameron
Wild guess; use strace to look for a signal at the time the window is
closed, and add code to replace the handler for the signal.

For instance, to handle Ctrl+C gracefully in Python that uses GTK,
some of my code does this;

GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, callback)

-- 
James Cameron
http://quozl.netrek.org/
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Closing XTerm causes the GTK app to exit, inspite of disown/nohup on its PID - why?

2019-03-05 Thread Veek M via gtk-list
https://www.reddit.com/r/bash/comments/axi4n6/closing_xterm_causes_the_app_to_exit_inspite_of/

Adding nohup works but ONLY for xclock xfontsel xpdf - hexchat and
firefox exit when the terminal exits - basically GTK apps.

Script creates a named-pipe .Xauthority to pass MIT-MAGIC-cookie data
to a app running as X_USER. It works great but I'm unable to detach
the process from its XTerm. Closing XTerm closes the app.

I want to use an XTerm because it supports -hold (for debugging) if
there's a problem I can insert a -hold to view the error message.

#!/usr/bin/bash
#Usage: bash run appname

set +xv

X_USER=veek
DIR_X_USER=/home/veek


function error
{
echo "$@" >>/tmp/error.$0
}

function create_fifo
{
error $FUNCNAME[0];
mkfifo ${DIR_X_USER}/.Xauthority;
chown $USER:$USER ${DIR_X_USER}/.Xauthority
}


getopts k myarg

case $myarg in
k) pkill -KILL -u ${X_USER}; shift;;
*) if [ $# -lt 1 ]; then
echo "Usage: $0 [-k] app_name";
exit 1;
   fi;;
esac

declare -A myapp_list=( [ff]=firefox
[hex]=hexchat
[pdf]='wine .wine/drive_c/Program Files/Tracker Software/PDF
Viewer/PDFXCview.exe' )

case $1 in
pdf*) set ${myapp_list[$1]%% *} "${myapp_list[$1]#[a-z]* }";;
*) set ${myapp_list[$1]:-"$@"};;
esac

[ ! -O ${DIR_X_USER}/.Xauthority ] && {
error $FUNCNAME[0];
rm ${DIR_X_USER}/.Xauthority;
create_fifo;
}
[ -f ${DIR_X_USER}/.Xauthority ] && {
error $FUNCNAME[0]; exit
exit 1;
}
[ ! -p ${DIR_X_USER}/.Xauthority ] && {
error $FUNCNAME[0];
create_fifo;
}

if [ -p ${DIR_X_USER}/.Xauthority ]; then
xterm -geometry -0-0 -T 'sudoAuth' -e bash -c '
if mkdir -v /tmp/fe.lock; then
echo "start"; trap "rm -rf /tmp/fe.lock/" 0
declare -g count=0
while true; do
#blocks waiting for an app to read fifo
cat ~/.Xauthority >>$1/.Xauthority;
echo $((count = count + 1)) ;
done
else
exit 0
fi
' junk_txt "${DIR_X_USER}"&
fi


#xterm -e "su - ${X_USER} -c 'export XAUTHORITY=~/.Xauthority; hexchat'"
#-hold to see the XTerm error msg
xterm -T "$1" -e sudo -u "${X_USER}" bash -c '
export DISPLAY=:0.0
export XAUTHORITY=/home/veek/.Xauthority
progname="$1"; shift;
cd;
if [ ${#1} -gt 0 ]; then
echo two args
nohup "$progname" "$1"&
else
nohup "$progname"&
fi
for pid in $(jobs -p); do
echo $pid
disown $pid
done
echo done
sleep 40' junk_txt "$1" "$2"&
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


Treeview sortingis this a bug

2019-03-05 Thread Mike Martin via gtk-perl-list
I am trying to toggle sorting on a liststore, so I am trying to use

$list->get_column(0)->set_sort_column_id(-2)
where list is a treeview containing a liststore

as per
GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID

#define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID (-2)

The GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID can be used to make a
GtkTreeSortable
 use no
sorting.

referenced on
https://developer.gnome.org/gtk3/stable/GtkTreeSortable.html#GTK-TREE-SORTABLE-UNSORTED-SORT-COLUMN-ID:CAPS

However I get the error message

gtk_tree_view_column_set_sort_column_id: assertion 'sort_column_id >= -1'
failed

thanks


Mike
___
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list


Re: [gtk-osx-users] cannot build core libraries

2019-03-05 Thread John Ralls
What was the actual error? 

Regards,
John Ralls


> On Mar 5, 2019, at 8:34 AM, v...@myridia.com wrote:
> 
> thanks i could go on.
> 
> but now i hang with the jhbuild libxml2
> something seems missing:
> 
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[4]: *** [Makefile:597: libxml2mod.la] Error 1
> make[4]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8/python'
> make[3]: *** [Makefile:685: all-recursive] Error 1
> make[3]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8/python'
> make[2]: *** [Makefile:525: all] Error 2
> make[2]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8/python'
> make[1]: *** [Makefile:1442: all-recursive] Error 1
> make[1]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8'
> make: *** [Makefile:861: all] Error 2
> *** Error during phase build of libxml2: ## Error running make -j
> 9  *** [1/1]
> 
> On Thu, February 21, 2019 9:54 pm, John Ralls wrote:
>> 
> 
>> 
>>> On Feb 20, 2019, at 8:53 PM, v...@myridia.com wrote:
>>> 
>>> 
>>> hi,
>>> 
>>> im right now with my second clean mojave installation, and i follow the
>>> instruction on this site:
>>> 
>>> https://wiki.gnome.org/action/show/Projects/GTK/OSX/Building?action=sho
>>> w=Projects%2FGTK%2B%2FOSX%2FBuilding
>>> 
>>> 
>>> i could again build all except:
>>> 
>>> meta-gtk-osx-core and meta-gtk-osx-gtk3
>>> 
>>> on meta-gtk-osx-gtk3 what i really need for my little c-gtk3 desktop
>>> app i stuck with missing python libs like six 
>> 
>> Python3 is now required by gobject-integration, so add that to your
>> module list. It will build pretty early because libxml needs it. After
>> building python 3 completes interrupt the build and drop to a shell where
>> you'll need to create symlinks $PREFIX/bin/python -> $PREFIX//bin/python3
>> and $PREFIX/bin/python-config -> $PREFIX/bin/python3-config. Then you can
>> run python --ensurepip followed by pip six, quit the shell, and resume
>> your build.
>> 
>> Regards,
>> John Ralls
>> 
>> 
>> 
> 
> 

___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list


Re: [gtk-osx-users] cannot build core libraries

2019-03-05 Thread v...@myridia.com
thanks i could go on.

but now i hang with the jhbuild libxml2
something seems missing:

 clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[4]: *** [Makefile:597: libxml2mod.la] Error 1
make[4]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8/python'
make[3]: *** [Makefile:685: all-recursive] Error 1
make[3]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8/python'
make[2]: *** [Makefile:525: all] Error 2
make[2]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8/python'
make[1]: *** [Makefile:1442: all-recursive] Error 1
make[1]: Leaving directory '/Users/veto/gtk/source/libxml2-2.9.8'
make: *** [Makefile:861: all] Error 2
*** Error during phase build of libxml2: ## Error running make -j
9  *** [1/1]

On Thu, February 21, 2019 9:54 pm, John Ralls wrote:
>

>
>> On Feb 20, 2019, at 8:53 PM, v...@myridia.com wrote:
>>
>>
>> hi,
>>
>> im right now with my second clean mojave installation, and i follow the
>> instruction on this site:
>>
>> https://wiki.gnome.org/action/show/Projects/GTK/OSX/Building?action=sho
>> w=Projects%2FGTK%2B%2FOSX%2FBuilding
>>
>>
>> i could again build all except:
>>
>> meta-gtk-osx-core and meta-gtk-osx-gtk3
>>
>> on meta-gtk-osx-gtk3 what i really need for my little c-gtk3 desktop
>> app i stuck with missing python libs like six 
>
> Python3 is now required by gobject-integration, so add that to your
> module list. It will build pretty early because libxml needs it. After
> building python 3 completes interrupt the build and drop to a shell where
> you'll need to create symlinks $PREFIX/bin/python -> $PREFIX//bin/python3
> and $PREFIX/bin/python-config -> $PREFIX/bin/python3-config. Then you can
> run python --ensurepip followed by pip six, quit the shell, and resume
> your build.
>
> Regards,
> John Ralls
>
>
>


___
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list