Re: Status of Submitted Patches

2018-05-24 Thread Ricardo Wurmus

Hi Sahithi,

>> When you’re done with these changes, please make a local commit and send
>> the output of “git format-patch -1”.
> the following is the output of “git format-patch -1”
>
> */0001-Added-Colorize-module-to-Guix-ui.scm.patch/*
>
> Can you please check and guide to proceed further.

Please attach the file of that same name in an email.

-- 
Ricardo





Re: About GCC-5.5.0

2018-05-24 Thread Rene
In this new execution, I have set CFLAGS='-fno-stack-protector', but the 
variable  stack_protector still with null value (stack_protector='' ).

Attached log files.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Library configure (see version.h), which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../glibc-2.23-hurd+libpthread-20161218/configure CONFIG_SHELL=/gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin/bash SHELL=/gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin/bash --prefix=/gnu/store/b9rkk630drw4p7bappdb17piz0wibs9k-glibc-intermediate-2.23 --enable-fast-install --build=i586-unknown-gnu --host=i586-guix-gnu --build=i586-unknown-gnu --enable-obsolete-rpc --disable-stack-protector --enable-stack-protector=no --disable-stack-protector-all --disable-stack-protector-strong CFLAGS=-fno-stack-protector --host=i586-pc-gnu --enable-pt_chown --disable-werror --disable-nscd --enable-add-ons --sysconfdir=/etc libc_cv_complocaledir=/run/current-system/locale/2.26 --with-headers=/gnu/store/c9h0i188sli0bb0s6nfs096wsmvx4zkd-hurd-core-headers-0.9/include BASH_SHELL=/gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin/bash libc_cv_ssp=no libc_cv_ssp_strong=no

## - ##
## Platform. ##
## - ##

hostname = Hurd
uname -m = i686-AT386
uname -r = 0.9
uname -s = GNU
uname -v = GNU-Mach 1.8+git20170609-486/Hurd-0.9

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /gnu/store/a88rb5jz1ymc417lfcgzc25gn5hlfy34-texinfo-6.5/bin
PATH: /gnu/store/bddl4pa579yvy4l3kfxbk13pxmg6bsq5-perl-boot0-5.26.1/bin
PATH: /gnu/store/3k8431g54gj3d65k9slbbf6w274zfw6d-gcc-cross-boot0-5.5.0/bin
PATH: /gnu/store/p0w3z8vg8g33azgs14w4zq569k38qn06-ld-wrapper-boot0-0/bin
PATH: /gnu/store/4xjychl22p1620vpnjcgi9f3iflnqkj8-binutils-cross-boot0-2.28.1/bin
PATH: /gnu/store/y0zagc1y50dk2rf6amcr2cikx32pdd6g-make-boot0-4.2.1/bin
PATH: /gnu/store/nmx44r1360ikfnrcad62za0d9lbnwwl6-diffutils-boot0-3.6/bin
PATH: /gnu/store/qd300gsh0gd634akszms1x70psmqd3qs-findutils-boot0-4.6.0/bin
PATH: /gnu/store/lhxih6bp4hd85r1h208fmrigm5zi9afx-file-boot0-5.32/bin
PATH: /gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin
PATH: /gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin
PATH: /gnu/store/8zqksqw8miagwcg4cvz3sx0q263f5x2k-mig-1.8/bin
PATH: /gnu/store/c9h0i188sli0bb0s6nfs096wsmvx4zkd-hurd-core-headers-0.9/bin


## --- ##
## Core tests. ##
## --- ##

configure:2189: checking build system type
configure:2203: result: i586-unknown-gnu
configure:2223: checking host system type
configure:2236: result: i586-pc-gnu
configure:2265: checking for i586-pc-gnu-gcc
configure:2281: found /gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin/i586-pc-gnu-gcc
configure:2292: result: i586-pc-gnu-gcc
configure:2561: checking for C compiler version
configure:2570: i586-pc-gnu-gcc --version >&5
i586-pc-gnu-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2581: $? = 0
configure:2570: i586-pc-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=i586-pc-gnu-gcc
COLLECT_LTO_WRAPPER=/gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin/../libexec/gcc/i586-pc-gnu/5.4.0/lto-wrapper
Target: i586-pc-gnu
Configured with: 
Thread model: posix
gcc version 5.4.0 (GCC) 
configure:2581: $? = 0
configure:2570: i586-pc-gnu-gcc -V >&5
i586-pc-gnu-gcc: error: unrecognized command line option '-V'
i586-pc-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2581: $? = 1
configure:2570: i586-pc-gnu-gcc -qversion >&5
i586-pc-gnu-gcc: error: unrecognized command line option '-qversion'
i586-pc-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2581: $? = 1
configure:2586: checking for suffix of object files
configure:2608: i586-pc-gnu-gcc -c -fno-stack-protector  conftest.c >&5
configure:2612: $? = 0
configure:2633: result: o
configure:2637: checking whether we are using the GNU C compiler
configure:2656: i586-pc-gnu-gcc -c -fno-stack-protector  conftest.c >&5
configure:2656: $? = 0
configure:2665: result: yes
configure:2674: checking whether i586-pc-gnu-gcc accepts -g
configure:2694: i586-pc-gnu-gcc -c -g  conftest.c >&5
configure:2694: $? = 0
configure:2735: result: yes
configure:2764: checking for gcc
configure:2780: found /gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin/gcc
configure:2791: result: gcc
configure:2815: checking for i586-pc-gnu-readelf
configure:2845: result: no
configure:2855: che

Re: Status of Submitted Patches

2018-05-24 Thread Sahitihi
Hi Ricardo,
Done with changes and local commit
> When you’re done with these changes, please make a local commit and send
> the output of “git format-patch -1”.
the following is the output of  “git format-patch -1”

*/0001-Added-Colorize-module-to-Guix-ui.scm.patch/*

Can you please check and guide to proceed further.

Thanks!

--
Sahithi


Re: About GCC-5.5.0

2018-05-24 Thread Rene
Hello Samuel,

yes, I attach the log file.


​Thank you
Rene

> > 
> > Any idea of how we can approach it?
> 
> Getting the config.log would allow to have more ideas :)
>
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Library configure (see version.h), which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../glibc-2.23-hurd+libpthread-20161218/configure CONFIG_SHELL=/gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin/bash SHELL=/gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin/bash --prefix=/gnu/store/0h1887n99w6gzng4yfshld33567kak5p-glibc-intermediate-2.23 --enable-fast-install --build=i586-unknown-gnu --host=i586-guix-gnu --build=i586-unknown-gnu --enable-obsolete-rpc --disable-stack-protector --enable-stack-protector=no --disable-stack-protector-all --disable-stack-protector-strong --host=i586-pc-gnu --enable-pt_chown --disable-werror --disable-nscd --enable-add-ons --sysconfdir=/etc libc_cv_complocaledir=/run/current-system/locale/2.26 --with-headers=/gnu/store/c9h0i188sli0bb0s6nfs096wsmvx4zkd-hurd-core-headers-0.9/include BASH_SHELL=/gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin/bash libc_cv_ssp=no libc_cv_ssp_strong=no

## - ##
## Platform. ##
## - ##

hostname = Hurd
uname -m = i686-AT386
uname -r = 0.9
uname -s = GNU
uname -v = GNU-Mach 1.8+git20170609-486/Hurd-0.9

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /gnu/store/a88rb5jz1ymc417lfcgzc25gn5hlfy34-texinfo-6.5/bin
PATH: /gnu/store/bddl4pa579yvy4l3kfxbk13pxmg6bsq5-perl-boot0-5.26.1/bin
PATH: /gnu/store/3k8431g54gj3d65k9slbbf6w274zfw6d-gcc-cross-boot0-5.5.0/bin
PATH: /gnu/store/p0w3z8vg8g33azgs14w4zq569k38qn06-ld-wrapper-boot0-0/bin
PATH: /gnu/store/4xjychl22p1620vpnjcgi9f3iflnqkj8-binutils-cross-boot0-2.28.1/bin
PATH: /gnu/store/y0zagc1y50dk2rf6amcr2cikx32pdd6g-make-boot0-4.2.1/bin
PATH: /gnu/store/nmx44r1360ikfnrcad62za0d9lbnwwl6-diffutils-boot0-3.6/bin
PATH: /gnu/store/qd300gsh0gd634akszms1x70psmqd3qs-findutils-boot0-4.6.0/bin
PATH: /gnu/store/lhxih6bp4hd85r1h208fmrigm5zi9afx-file-boot0-5.32/bin
PATH: /gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin
PATH: /gnu/store/xdgs5mxay8a9bvhh07c8k5i0ms1027sz-bootstrap-binaries-0/bin
PATH: /gnu/store/8zqksqw8miagwcg4cvz3sx0q263f5x2k-mig-1.8/bin
PATH: /gnu/store/c9h0i188sli0bb0s6nfs096wsmvx4zkd-hurd-core-headers-0.9/bin


## --- ##
## Core tests. ##
## --- ##

configure:2189: checking build system type
configure:2203: result: i586-unknown-gnu
configure:2223: checking host system type
configure:2236: result: i586-pc-gnu
configure:2265: checking for i586-pc-gnu-gcc
configure:2281: found /gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin/i586-pc-gnu-gcc
configure:2292: result: i586-pc-gnu-gcc
configure:2561: checking for C compiler version
configure:2570: i586-pc-gnu-gcc --version >&5
i586-pc-gnu-gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2581: $? = 0
configure:2570: i586-pc-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=i586-pc-gnu-gcc
COLLECT_LTO_WRAPPER=/gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin/../libexec/gcc/i586-pc-gnu/5.4.0/lto-wrapper
Target: i586-pc-gnu
Configured with: 
Thread model: posix
gcc version 5.4.0 (GCC) 
configure:2581: $? = 0
configure:2570: i586-pc-gnu-gcc -V >&5
i586-pc-gnu-gcc: error: unrecognized command line option '-V'
i586-pc-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2581: $? = 1
configure:2570: i586-pc-gnu-gcc -qversion >&5
i586-pc-gnu-gcc: error: unrecognized command line option '-qversion'
i586-pc-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2581: $? = 1
configure:2586: checking for suffix of object files
configure:2608: i586-pc-gnu-gcc -c   conftest.c >&5
configure:2612: $? = 0
configure:2633: result: o
configure:2637: checking whether we are using the GNU C compiler
configure:2656: i586-pc-gnu-gcc -c   conftest.c >&5
configure:2656: $? = 0
configure:2665: result: yes
configure:2674: checking whether i586-pc-gnu-gcc accepts -g
configure:2694: i586-pc-gnu-gcc -c -g  conftest.c >&5
configure:2694: $? = 0
configure:2735: result: yes
configure:2764: checking for gcc
configure:2780: found /gnu/store/xaijd1mmjsi4kkim8nl41a9h4ks5mkd6-gcc-bootstrap-0/bin/gcc
configure:2791: result: gcc
configure:2815: checking for i586-pc-gnu-readelf
configure:2845: result: no
configure:2855: checking for readelf
configure:2871: found /gnu/store/4xjychl22p16

Re: About GCC-5.5.0

2018-05-24 Thread Samuel Thibault
Hello,

Rene, le mer. 23 mai 2018 22:57:21 -0400, a ecrit:
> I am updating my Guix repository on Debian/Hurd and I have the following error
> in the 'configure' phase of glibc(glibc-intermediate-2.23).
> We have tried to add the flag '-fno-stack-protector' to glibc, however the
> error remains.
> 
> Any idea of how we can approach it?

Getting the config.log would allow to have more ideas :)

> ---
>   checking if i586-pc-gnu-gcc accepts
> -fno-tree-loop-distribute-patterns with __at
>   tribute__ ((__optimize__))... yes
>   checking for libgd... no
>   checking for is_selinux_enabled in -lselinux... no
>   checking for _FORTIFY_SOURCE predefine... no   
>   checking whether i586-pc-gnu-gcc implicitly enables
> -fstack-protector... configu
>   re: error: unexpected symbols in test:
> ---
> 
> 
> Thank you
> Rene



Re: next browser (was: Packaging a free Firefox)

2018-05-24 Thread Ricardo Wurmus

Pierre Neidhardt  writes:

> Ricardo Wurmus  writes:
>
>> It is sometimes possible to patch the sources by replacing the library
>> name with the full path of the library.  Have you tried that?
>
> You are right.  I think what we need here is to patch all the cffi
> packages.
> For instance, sqlite3-lib contains the following lines:
>
> --8<---cut here---start->8---
> (define-foreign-library sqlite3-lib
>   (:darwin (:default "libsqlite3"))
>   (:unix (:or "libsqlite3.so.0" "libsqlite3.so"))
>   (t (:or (:default "libsqlite3") (:default "sqlite3"
> --8<---cut here---end--->8---
>
> Patching with the full path should work.  I'll see what I can do.

Thanks.

>> Another option is to wrap the executable in LD_LIBRARY_PATH, although
>> that should only be a last resort.
>>
>>> GuixSD has LIBRARY_PATH=~/.guix-profile/lib, can we use that?
>>
>> LIBRARY_PATH is only set when you have gcc-toolchain installed.  I don’t
>> have this variable.  It is also not applicable here: it is used by the
>> compiler at build time when linking applications.
>
> So to what would you wrap it?  The full path of the required libs?  E.g.
>
> LD_LIBRARY_PATH=/gnu/store/sdin91pj2w7m5avvb6vykh6haq8q2ni0-sqlite-3.21.0/lib/:...

Yes, just like that.  See the build phases of eolie in (gnu packages
gnome) as an example.

(Speaking of eolie: I should update it.)

-- 
Ricardo





Re: Status of Submitted Patches

2018-05-24 Thread Ricardo Wurmus

Hi Sahithi,

>> Another note about style: I think it would be better to use
>> “alist->hash-table” instead of “make-hash-table” followed by repeated
>> modifications to the hash table with “hashq-set!”.  We prefer to avoid
>> mutation of values when possible.
>
> I have made all necessary modifications. Can please review it once.

Thanks, this looks fine.
You don’t need (srfi srfi-13) for “string-join”.

>> Regarding copyright headers: please make sure to also add a copyright
>> line for yourself and a copyright line from the file of guile-colorize
>> to “(guix ui)”.
>>
>> When you’re done with these changes, please make a local commit and send
>> the output of “git format-patch -1”.
>
>
> I will proceed further once it is reviewed. :)

Please proceed with the patch.  I’d like us to make progress a little
more quickly going forward.

Thanks!

--
Ricardo





Re: Updating udisks: New dependencies (libblockdev, volume-key, dmraid, libbytesize, ndctl...)

2018-05-24 Thread Nils Gillmann
Pierre Neidhardt transcribed 1.3K bytes:
> 
> I'm working on updating udisks from the "old legacy" version (which is
> currently packaged in Guix) to version 2.7.6.
> 
>   https://github.com/storaged-project/udisks
> 
> It turns out to be much harder than expected!  Recent versions of udisks
> depend on libblockdev, which in turn depends on the 
> volume_key, dmraid, libbytesize, ndctl and possibly more, all of which
> are not packaged in Guix yet.
> 
> What do you think?  Is it worth it?  Any alternative to udisks?

Possibly there are alternatives, but it is required by some parts in
Guix. So,

> Otherwise I'll go ahead and send a big fat patch set.

as Invader Zim would say: "More patches means more Guix!" (go for it :)).



Updating udisks: New dependencies (libblockdev, volume-key, dmraid, libbytesize, ndctl...)

2018-05-24 Thread Pierre Neidhardt

I'm working on updating udisks from the "old legacy" version (which is
currently packaged in Guix) to version 2.7.6.

https://github.com/storaged-project/udisks

It turns out to be much harder than expected!  Recent versions of udisks
depend on libblockdev, which in turn depends on the 
volume_key, dmraid, libbytesize, ndctl and possibly more, all of which
are not packaged in Guix yet.

What do you think?  Is it worth it?  Any alternative to udisks?

Otherwise I'll go ahead and send a big fat patch set.

--
Pierre Neidhardt

Poorochrondria:
Hypochrondria derived from not having medical insurance.
-- Douglas Coupland, "Generation X: Tales for an Accelerated
   Culture"


signature.asc
Description: PGP signature


Re: Code of Conduct and Diversity Statement

2018-05-24 Thread Tobias Geerinckx-Rice
Leo Famulari wrote:
> On Wed, May 16, 2018 at 11:26:07PM -0700, Chris Marusich wrote:
>> These all seem like good improvements to me.  I think we should upgrade
>> to 1.4!
>
> +1

Oh, is this still under review? +1!

Kind regards,

T G-R



Re: Status of Submitted Patches

2018-05-24 Thread Sahitihi
Hi Ricardo,
> Another note about style: I think it would be better to use
> “alist->hash-table” instead of “make-hash-table” followed by repeated
> modifications to the hash table with “hashq-set!”.  We prefer to avoid
> mutation of values when possible.

I have made all necessary modifications. Can please review it once.
> Regarding copyright headers: please make sure to also add a copyright
> line for yourself and a copyright line from the file of guile-colorize
> to “(guix ui)”.
>
> When you’re done with these changes, please make a local commit and send
> the output of “git format-patch -1”.


I will proceed further once it is reviewed. :)

Thanks!!
---
Sahithi
(define-module (term ansi-color)
 #:export  (color
colorize-string)
 #:use-module (srfi srfi-1)   ; for 'remove'
 #:use-module (srfi srfi-13)) ; for 'string-join' 

(define ansi-color-tables
  `((CLEAR   .   "0")
(RESET   .   "0")
(BOLD.   "1")
(DARK.   "2")
(UNDERLINE   .   "4")
(UNDERSCORE  .   "4")
(BLINK   .   "5")
(REVERSE .   "6")
(CONCEALED   .   "8")
(BLACK   .  "30")
(RED .  "31")
(GREEN   .  "32")
(YELLOW  .  "33")
(BLUE.  "34")
(MAGENTA .  "35")
(CYAN.  "36")
(WHITE   .  "37")
(ON-BLACK.  "40")
(ON-RED  .  "41")
(ON-GREEN.  "42")
(ON-YELLOW   .  "43")
(ON-BLUE .  "44")
(ON-MAGENTA  .  "45")
(ON-CYAN .  "46")
(ON-WHITE.  "47")))

(define (color . lst)
  (let ((color-list 
 (remove not 
 (map (lambda (color) (assq-ref ansi-color-tables color))
  lst
(if (null? color-list)
""
(string-append 
 (string #\esc #\[)
 (string-join color-list ";" 'infix)
 "m"
  
(define (colorize-string str . color-list)
  (string-append
   (apply color color-list)
   str
   (color 'RESET)))

(display (colorize-string "Hello!\n" 'RED 'BOLD 'ON-BLUE))

(for-each display
  (list (color 'RED 'BOLD 'ON-BLUE)
"Hello!"
 (color 'RESET)))



Re: next browser (was: Packaging a free Firefox)

2018-05-24 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> It is sometimes possible to patch the sources by replacing the library
> name with the full path of the library.  Have you tried that?

You are right.  I think what we need here is to patch all the cffi
packages.
For instance, sqlite3-lib contains the following lines:

--8<---cut here---start->8---
(define-foreign-library sqlite3-lib
  (:darwin (:default "libsqlite3"))
  (:unix (:or "libsqlite3.so.0" "libsqlite3.so"))
  (t (:or (:default "libsqlite3") (:default "sqlite3"
--8<---cut here---end--->8---

Patching with the full path should work.  I'll see what I can do.

Maybe we should think of a function to do that automatically for all
cffi packages.  Not sure how doable that'd be.

> Another option is to wrap the executable in LD_LIBRARY_PATH, although
> that should only be a last resort.
>
>> GuixSD has LIBRARY_PATH=~/.guix-profile/lib, can we use that?
>
> LIBRARY_PATH is only set when you have gcc-toolchain installed.  I don’t
> have this variable.  It is also not applicable here: it is used by the
> compiler at build time when linking applications.

So to what would you wrap it?  The full path of the required libs?  E.g.

LD_LIBRARY_PATH=/gnu/store/sdin91pj2w7m5avvb6vykh6haq8q2ni0-sqlite-3.21.0/lib/:...

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Code of Conduct and Diversity Statement

2018-05-24 Thread Leo Famulari
On Wed, May 16, 2018 at 11:26:07PM -0700, Chris Marusich wrote:
> These all seem like good improvements to me.  I think we should upgrade
> to 1.4!

+1


signature.asc
Description: PGP signature


Re: next browser (was: Packaging a free Firefox)

2018-05-24 Thread Ricardo Wurmus

Hi Pierre,

> Ricardo Wurmus  writes:
>
>>> The main issue is with cffi: it does not find the libraries installed by 
>>> Guix.
>> […]
>>
>> I don’t understand this.  Should it load any libraries that the user may
>> have installed?  Or do you only refer to a specific set of libraries
>> that is known at build time?
>
> Sorry for the confusing report, I suppose it needs more details: cffi is
> the "common foreign function interface" for Common Lisp.  It allows for
> writing bindings to libraries written in different languages (mostly C
> as far as I understand).
>
>   http://common-lisp.net/project/cffi
>
> cffi-based projects like Next load libraries at runtime (in
> this case .so files).  No special provision is taken for finding those
> libaries, or at least nothing I could spot from the source code.  I
> understand that it relies on system calls.  But while
> dlopen("libsqlite3.so") works in C, cffi fails to load "libsqlite3.so",
> unless we specify an appropriate LD_LIBRARY_PATH.

It is sometimes possible to patch the sources by replacing the library
name with the full path of the library.  Have you tried that?

Another option is to wrap the executable in LD_LIBRARY_PATH, although
that should only be a last resort.

> GuixSD has LIBRARY_PATH=~/.guix-profile/lib, can we use that?

LIBRARY_PATH is only set when you have gcc-toolchain installed.  I don’t
have this variable.  It is also not applicable here: it is used by the
compiler at build time when linking applications.

--
Ricardo





Re: next browser (was: Packaging a free Firefox)

2018-05-24 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

>> The main issue is with cffi: it does not find the libraries installed by 
>> Guix.
> […]
>
> I don’t understand this.  Should it load any libraries that the user may
> have installed?  Or do you only refer to a specific set of libraries
> that is known at build time?

Sorry for the confusing report, I suppose it needs more details: cffi is
the "common foreign function interface" for Common Lisp.  It allows for
writing bindings to libraries written in different languages (mostly C
as far as I understand).

http://common-lisp.net/project/cffi

cffi-based projects like Next load libraries at runtime (in
this case .so files).  No special provision is taken for finding those
libaries, or at least nothing I could spot from the source code.  I
understand that it relies on system calls.  But while
dlopen("libsqlite3.so") works in C, cffi fails to load "libsqlite3.so",
unless we specify an appropriate LD_LIBRARY_PATH.

I'm not quite sure how applications find libraries on GuixSD.

>> --8<---cut here---start->8---
>> LISP?=sbcl
>>
>> build-gtk:
>>  $(LISP) \
>>  --eval '(ql:quickload :cffi)' \
>>  --eval '(push (format nil "~a/.guix-profile/lib/" (uiop:getenv 
>> "HOME")) cffi:*foreign-library-directories*)' \
>> ## Rest is as usual.
>>  --load next.asd \
>>  --eval '(ql:quickload :next/gtk)' \
>>  --eval '(asdf:make :next/gtk)' \
>>  --eval '(quit)'
>> --8<---cut here---end--->8---
>
> This would not be good, because packages can be installed in different
> profiles, not only in the user’s home directory.

Indeed, but I don't know a better solution.  Any idea how to do this
properly?

GuixSD has LIBRARY_PATH=~/.guix-profile/lib, can we use that?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


RE: Mes 0.14 released

2018-05-24 Thread Orians, Jeremiah (DTMB)
> I am pleased to announce the release of Mes 0.14, representing 98 commits 
> over 4 weeks.  Mes+MesCC now compiles a self-hosting TinyCC that has only 
> been slightly patched.
> This means that we can now build a tcc that depends only on a 1MB ASCII M1 
> seed.  GuixSD currently uses a ~250MB binary seed to build gcc.
> Next targets are: build gcc using this almost full-source bootstrapped tcc, 
> and reduce the 1MB ASCII M1 seed to ~100KB of M2 source, which is a 
> restricted subset of C.
> Packages are available from Guix's wip-bootstrap branch.

Amazing work as always Janneke

- Jeremiah Orians


Re: GSoC: Adding a web interface similar to the Hydra web interface

2018-05-24 Thread Ricardo Wurmus

Hi Tatiana,

> I have committed the first HTML template page (with table of specifications
> stored in the database) to web-interface branch. Can you please review it?

That’s great!  Congratulations on your first commit!

I’ll make a couple of extra comments on style and conventions because
this is your first commit.  You aren’t expected to remember all of these
conventions right away.

> commit a4fe6dd0d0c82c84a810d3368dd60fea3aa1b2b0 (HEAD -> web-interface, 
> origin/web-interface)
> Author: TSholokhova 
> Date:   Wed May 23 16:37:23 2018 +0300
>
> basic html templates

Please remember to make expressive commit messages.  We normally use a
format similar to the ChangeLog convention, which consists of a one-line
summary that is usually a sentence, and a listing of all changes.

In this case it would be something like:

--8<---cut here---start->8---
Add basic HTML templates.

* src/cuirass/templates.scm: New file.
* Makefile.am (dist_pkgmodule_DATA): Add it.
* src/cuirass/http.scm (url-handler): Add handler for “status”
endpoint.
--8<---cut here---end--->8---


> diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
> index e911b9b..f5e3ac1 100644
> --- a/src/cuirass/http.scm
> +++ b/src/cuirass/http.scm
> @@ -1,3 +1,4 @@
> +
>   http.scm -- HTTP API
>  ;;; Copyright © 2016 Mathieu Lirzin 
>  ;;; Copyright © 2017 Mathieu Othacehe 

Please make sure to add a copyright line for yourself to the bottom of
the copyright block.  Also try to avoid pure whitespace changes like the
addition of an empty line at the top of the file.

> @@ -135,6 +139,12 @@ Hydra format."
>   #:body
>   (object->json-string
>`((error . ,message)
> +
> +  (define (respond-html body)
> +(respond '((content-type . (text/html)))
> + #:body (lambda (port)
> +  (sxml->xml body port)
> +  )))

Please don’t leave closing parentheses on a line by itself; they feel
lonely and prefer to be on the previous line.

> @@ -223,6 +233,11 @@ Hydra format."
>,@params
>(order status+submission-time)
> (respond-json-with-error 500 "Parameter not defined!"
> +(("status")
> + (respond-html (templatize
> + "Status"
> + (specifications-table
> +  (with-critical-section db-channel (db) 
> (db-get-specifications db))

Here and in other places you used tabs, but we’re using spaces for
indentation in all source files.  Please configure your editor to use
spaces instead of tabs.

I feel that the “url-handler” procedure is already very large, so it may
be a good idea to break out the handler to a separate procedure instead
of having the details inline.  This is not a problem yet, but it may be
good to keep in mind in case you need to grow this handler in the
future.  As long as it stays this small it’s fine to keep it there.

> diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
> new file mode 100644
> index 000..ff63469
> --- /dev/null
> +++ b/src/cuirass/templates.scm
> @@ -0,0 +1,32 @@
> +(define-module (cuirass templates)
> +  #:export (templatize
> +specifications-table))
> +
> +

Please add the usual copyright header to the top of this module.

> +(define (templatize title body)
> +  `(html
> +,(head title)
> +(body ,body)))

Please also add a docstring to every toplevel definition to explain what
the procedure is supposed to do.  “templatize” is quite a fancy name for
what I’d call “html-page” :)

> +
> +(define (head title)
> +  `(head
> +(meta (@ (charset "utf-8")))
> +(title ,title)))

This could become part of “templatize” instead.  It’s generally good to
have small independent procedures, but in this case I don’t see us ever
using “head” without “templatize”.

> +(define (specifications-table specs)
> +  `(table
> +(@ (class "table-fill"))
> +(thead
> + (tr
> +  (th (@ (class "text-left")) Name)
> +  (th (@ (class "text-left")) Branch)))
> +(tbody
> + (@ (class "table-fill"))
> + ,@(map
> +(lambda (spec)
> +  `(tr
> +(td ,(assq-ref spec #:name))
> +(td ,(assq-ref spec #:branch
> +specs

Please also add a docstring to this procedure.  What is the result of
this procedure if “specs” is empty?  Should that case be covered to
communicate this to the viewer?

> I am a bit confused about the database structure. As far as I understand,
> there are project_name (project) and branch_name (jobset) properties, but
> project_name is a primary key, so a project can't have several branches?

I share your confusion.  Maybe Ludovic or Mathieu can shed some more
light on this.

It is true that “repo_name” (not project_name) in the Specifications
table is the primary key and it is used as the only foreign key on other
tabl

Re: next browser (was: Packaging a free Firefox)

2018-05-24 Thread Ricardo Wurmus

Hi Pierre,

> Hooray, I've managed to run Next Browser on GuixSD!

Excellent!  I’m looking forward to playing with it.

> The main issue is with cffi: it does not find the libraries installed by Guix.
[…]

I don’t understand this.  Should it load any libraries that the user may
have installed?  Or do you only refer to a specific set of libraries
that is known at build time?

> --8<---cut here---start->8---
> LISP?=sbcl
>
> build-gtk:
>   $(LISP) \
>   --eval '(ql:quickload :cffi)' \
>   --eval '(push (format nil "~a/.guix-profile/lib/" (uiop:getenv 
> "HOME")) cffi:*foreign-library-directories*)' \
> ## Rest is as usual.
>   --load next.asd \
>   --eval '(ql:quickload :next/gtk)' \
>   --eval '(asdf:make :next/gtk)' \
>   --eval '(quit)'
> --8<---cut here---end--->8---

This would not be good, because packages can be installed in different
profiles, not only in the user’s home directory.

-- 
Ricardo





Re: [rb-general] Mes 0.14 released

2018-05-24 Thread Holger Levsen
On Thu, May 24, 2018 at 08:00:17AM +0200, Jan Nieuwenhuizen wrote:
> I am pleased to announce the release of Mes 0.14, representing 98
> commits over 4 weeks.  Mes+MesCC now compiles a self-hosting TinyCC
> that has only been slightly patched.
> 
> This means that we can now build a tcc that depends only on a 1MB
> ASCII M1 seed.  GuixSD currently uses a ~250MB binary seed to build
> gcc.
> 
> Next targets are: build gcc using this almost full-source bootstrapped
> tcc, and reduce the 1MB ASCII M1 seed to ~100KB of M2 source, which is
> a restricted subset of C.

you are doing very awesome work! please keep going and please keep
informing us about your progress! & thanks & have fun! :)


-- 
cheers,
Holger


signature.asc
Description: PGP signature