* Packaging timewarrior
@ 2023-01-16 16:44 Trev
2023-01-16 17:03 ` Timo Wilken
0 siblings, 1 reply; 3+ messages in thread
From: Trev @ 2023-01-16 16:44 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 4469 bytes --]
Hey All,
I can build timewarrior in my profile but I cannot seem to build it as
a package. I get a weird/ambiguous exit status 2 from make.
Here's the timewarrior package. It mostly came from assumptions I made
about https://timewarrior.net/docs/install/
-----
(define-module (trevdev packages task-management)
#:use-module (guix packages)
#:use-module (gnu packages python)
#:use-module (gnu packages ruby)
#:use-module (gnu packages base)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:))
(define-public timewarrior
(package
(name "timewarrior")
(version "1.4.3")
(source
(origin
(method url-fetch
(uri (string-append "https://github.com/GothenburgBitFactory/timewarrior/"
"releases/download/v" version
"/timew-" version ".tar.gz"))
(sha256
(base32 "0lyaqzcg8np2fpsmih0hlkjxd3qbadc7khr24m1pq9lsdhq7xpy4")))))
(build-system cmake-build-system)
(inputs (list gnu-make
python
ruby-asciidoctor))
(home-page "https://timewarrior.net")
(synopsis "A command line tool for tracking time.")
(description "Timewarrior is Free and Open Source Software that tracks
time from the command line")
(license license:expat)))
-----
The error I get when building is:
-----
[ 55%] Building CXX object src/CMakeFiles/libshared.dir/libshared/src/utf8.cpp.o
cd /tmp/guix-build-timewarrior-1.4.3.drv-0/build/src && /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/bin/c++ -I/tmp/guix-build-timewarrior-1.4.3.drv-0/timew-1.4.3 -I/tmp/guix-build-timewarrior-1.4.3.drv-0/timew-1.4.3/src -I/tmp/guix-build-timewarrior-1.4.3.drv-0/timew-1.4.3/src/commands -I/tmp/guix-build-timewarrior-1.4.3.drv-0/timew-1.4.3/src/libshared/src -Wall -Wextra -Wsign-compare -Wreturn-type -std=c++11 -O2 -g -DNDEBUG -MD -MT src/CMakeFiles/libshared.dir/libshared/src/utf8.cpp.o -MF CMakeFiles/libshared.dir/libshared/src/utf8.cpp.o.d -o CMakeFiles/libshared.dir/libshared/src/utf8.cpp.o -c /tmp/guix-build-timewarrior-1.4.3.drv-0/timew-1.4.3/src/libshared/src/utf8.cpp
[ 57%] Linking CXX static library liblibshared.a
cd /tmp/guix-build-timewarrior-1.4.3.drv-0/build/src && /gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4/bin/cmake -P CMakeFiles/libshared.dir/cmake_clean_target.cmake
cd /tmp/guix-build-timewarrior-1.4.3.drv-0/build/src && /gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4/bin/cmake -E cmake_link_script CMakeFiles/libshared.dir/link.txt --verbose=1
/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/bin/ar qc liblibshared.a CMakeFiles/libshared.dir/libshared/src/Args.cpp.o CMakeFiles/libshared.dir/libshared/src/Color.cpp.o CMakeFiles/libshared.dir/libshared/src/Composite.cpp.o CMakeFiles/libshared.dir/libshared/src/Configuration.cpp.o CMakeFiles/libshared.dir/libshared/src/Datetime.cpp.o CMakeFiles/libshared.dir/libshared/src/Duration.cpp.o CMakeFiles/libshared.dir/libshared/src/FS.cpp.o CMakeFiles/libshared.dir/libshared/src/JSON.cpp.o CMakeFiles/libshared.dir/libshared/src/Lexer.cpp.o CMakeFiles/libshared.dir/libshared/src/Msg.cpp.o CMakeFiles/libshared.dir/libshared/src/Palette.cpp.o CMakeFiles/libshared.dir/libshared/src/Pig.cpp.o CMakeFiles/libshared.dir/libshared/src/RX.cpp.o CMakeFiles/libshared.dir/libshared/src/Table.cpp.o CMakeFiles/libshared.dir/libshared/src/Timer.cpp.o CMakeFiles/libshared.dir/libshared/src/format.cpp.o CMakeFiles/libshared.dir/libshared/src/shared.cpp.o CMakeFiles/libshared.dir/libshared/src/unicode.cpp.o CMakeFiles/libshared.dir/libshared/src/utf8.cpp.o
/gnu/store/rc781v4k0drhaqn90xfwwpspki5x0bvf-binutils-2.37/bin/ranlib liblibshared.a
make[2]: Leaving directory '/tmp/guix-build-timewarrior-1.4.3.drv-0/build'
[ 57%] Built target libshared
make[1]: Leaving directory '/tmp/guix-build-timewarrior-1.4.3.drv-0/build'
make: *** [Makefile:159: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "8") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 12.0 seconds
command "make" "-j" "8" failed with status 2
-----
If it's of any use to anybody, I have attached the full build log. Any
guidance would be appreciated.
--
Trev : 0FB7 D06B 4A2A F07E AD5B 1169 183B 6306 8AA1 D206
[-- Attachment #2: b8ijzh77cvc7pbmxzkjs276w1rqhcj-timewarrior-1.4.3.drv.gz --]
[-- Type: application/octet-stream, Size: 6999 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Packaging timewarrior
2023-01-16 16:44 Packaging timewarrior Trev
@ 2023-01-16 17:03 ` Timo Wilken
2023-01-16 23:42 ` Trev
0 siblings, 1 reply; 3+ messages in thread
From: Timo Wilken @ 2023-01-16 17:03 UTC (permalink / raw)
To: help-guix, Trev
Hi Trev,
On 16 January 2023 17:44:45 CET, Trev <trev@trevdev.ca> wrote:
>If it's of any use to anybody, I have attached the full build log. Any
>guidance would be appreciated.
Make logs can be a bit annoying -- it runs multiple processes, and one make child can keep spewing info lines after another has already failed.
In your case, the "real" error is further up in the log:
/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/sh: line 1: /bin/sh: No such file or directory
make[2]: *** [src/commands/CMakeFiles/generate_additional_help.dir/build.make:76: src/commands/additional-help.h] Error 127
In Guix build containers, the /bin/sh symlink does not exist. Check timewarrior's makefiles for lines like "SHELL=/bin/sh" and substitute* them out with the result of something like #+(file-append bash-minimal "/bin/sh").
Cheers,
Timo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Packaging timewarrior
2023-01-16 17:03 ` Timo Wilken
@ 2023-01-16 23:42 ` Trev
0 siblings, 0 replies; 3+ messages in thread
From: Trev @ 2023-01-16 23:42 UTC (permalink / raw)
To: Timo Wilken; +Cc: help-guix
On 23/01/16 06:03PM, Timo Wilken wrote:
> Hi Trev,
>
>
> On 16 January 2023 17:44:45 CET, Trev <trev@trevdev.ca> wrote:
> >If it's of any use to anybody, I have attached the full build log. Any
> >guidance would be appreciated.
>
> Make logs can be a bit annoying -- it runs multiple processes, and one make child can keep spewing info lines after another has already failed.
>
This is really good to know. I will try to be more patient with these
log files going forward.
> In your case, the "real" error is further up in the log:
>
> /gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/sh: line 1: /bin/sh: No such file or directory
> make[2]: *** [src/commands/CMakeFiles/generate_additional_help.dir/build.make:76: src/commands/additional-help.h] Error 127
>
> In Guix build containers, the /bin/sh symlink does not exist. Check timewarrior's makefiles for lines like "SHELL=/bin/sh" and substitute* them out with the result of something like #+(file-append bash-minimal "/bin/sh").
>
This did the trick!
-----
(arguments (list
#:phases #~(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'patch-hardcoded-paths
(lambda _
(substitute* "src/commands/CMakeLists.txt"
(("/bin/sh") (string-append
#$(this-package-input
"bash-minimal")
"/bin/sh"))))))))
-----
I will clean my code up and get this contributed upstream :)
> Cheers,
> Timo
Cheers to you too. Thank you for the coaching and assistance.
--
Trev : 0FB7 D06B 4A2A F07E AD5B 1169 183B 6306 8AA1 D206
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-16 23:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-16 16:44 Packaging timewarrior Trev
2023-01-16 17:03 ` Timo Wilken
2023-01-16 23:42 ` Trev
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.