Tried following the Debian instructions to install on Ubuntu. Had to apt-get install debmake first, then hit this error:
contrib/make_deb.bash: line 186: a2x: command not found
You need to install asciidoc
C.f. #971, you need to install an additional package (I never updated the script to add this new dependency).
That took care of that problem. Thanks. Now I get:
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
I'm guessing I have to run the script with sudo, but if so I am not comfortable running a script as super user. Think you'll put out a Ubuntu package any time soon?
I'm having the same issue, the full error message is as following. The same error occurs when I run make inside src.
g++ -D_FORTIFY_SOURCE=2 -I/usr/include/ncursesw -O3 -pedantic -std=gnu++11 -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .alias_registry.opt.d -c -o .alias_registry.opt.o alias_registry.cc
alias_registry.cc: In member function ‘Kakoune::Vector<std::pair<Kakoune::StringView, Kakoune::StringView> > Kakoune::AliasRegistry::flatten_aliases() const’:
alias_registry.cc:60:30: error: no match for ‘operator|’ (operand types are ‘Kakoune::Vector<std::pair<Kakoune::StringView, Kakoune::StringView> > {aka std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >}’ and ‘Kakoune::ContainerView<Kakoune::TransformFactory<std::_Mem_fn<Kakoune::StringView std::pair<Kakoune::StringView, Kakoune::StringView>::*> > >’)
if (not contains(res | transform(std::mem_fn(&AliasDesc::first)), alias.key))
^
alias_registry.cc:60:30: note: candidates are:
In file included from completion.hh:7:0,
from command_manager.hh:5,
from alias_registry.cc:3:
flags.hh:22:17: note: template<class Flags, class> constexpr Flags Kakoune::operator|(Flags, Flags)
constexpr Flags operator|(Flags lhs, Flags rhs)
^
flags.hh:22:17: note: template argument deduction/substitution failed:
alias_registry.cc:60:72: note: deduced conflicting types for parameter ‘Flags’ (‘std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >’ and ‘Kakoune::ContainerView<Kakoune::TransformFactory<std::_Mem_fn<Kakoune::StringView std::pair<Kakoune::StringView, Kakoune::StringView>::*> > >’)
if (not contains(res | transform(std::mem_fn(&AliasDesc::first)), alias.key))
^
In file included from alias_registry.cc:4:0:
containers.hh:15:6: note: template<class Container, class Factory> decltype (view.factory(forward<Container>(container))) Kakoune::operator|(Container&&, Kakoune::ContainerView<Factory>)
auto operator| (Container&& container, ContainerView<Factory> view) ->
^
containers.hh:15:6: note: template argument deduction/substitution failed:
containers.hh: In substitution of ‘template<class Container, class Factory> decltype (view.factory(forward<Container>(container))) Kakoune::operator|(Container&&, Kakoune::ContainerView<Factory>) [with Container = std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >&; Factory = Kakoune::TransformFactory<std::_Mem_fn<Kakoune::StringView std::pair<Kakoune::StringView, Kakoune::StringView>::*> >]’:
alias_registry.cc:60:72: required from here
containers.hh:15:6: error: call of ‘(Kakoune::TransformFactory<std::_Mem_fn<Kakoune::StringView std::pair<Kakoune::StringView, Kakoune::StringView>::*> >) (std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >&)’ is ambiguous
In file included from alias_registry.cc:4:0:
containers.hh:165:8: note: candidates are:
struct TransformFactory
^
containers.hh:168:42: note: Kakoune::TransformView<Container&, Transform> Kakoune::TransformFactory<Transform>::operator()(Container&) const [with Container = std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >; Transform = std::_Mem_fn<Kakoune::StringView std::pair<Kakoune::StringView, Kakoune::StringView>::*>]
TransformView<Container&, Transform> operator()(Container& container) const { return {container, std::move(m_transform)}; }
^
containers.hh:171:58: note: Kakoune::TransformView<typename std::remove_reference<Container>::type, Transform> Kakoune::TransformFactory<Transform>::operator()(Container&&) const [with Container = std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >&; Transform = std::_Mem_fn<Kakoune::StringView std::pair<Kakoune::StringView, Kakoune::StringView>::*>; typename std::remove_reference<Container>::type = std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >]
TransformView<RemoveReference<Container>, Transform> operator()(Container&& container) const { return {std::move(container), std::move(m_transform)}; }
^
In file included from /usr/include/c++/4.8/ios:42:0,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iterator:64,
from array_view.hh:6,
from string.hh:4,
from alias_registry.hh:5,
from alias_registry.cc:1:
/usr/include/c++/4.8/bits/ios_base.h:163:3: note: constexpr std::_Ios_Iostate std::operator|(std::_Ios_Iostate, std::_Ios_Iostate)
operator|(_Ios_Iostate __a, _Ios_Iostate __b)
^
/usr/include/c++/4.8/bits/ios_base.h:163:3: note: no known conversion for argument 1 from ‘Kakoune::Vector<std::pair<Kakoune::StringView, Kakoune::StringView> > {aka std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >}’ to ‘std::_Ios_Iostate’
/usr/include/c++/4.8/bits/ios_base.h:123:3: note: constexpr std::_Ios_Openmode std::operator|(std::_Ios_Openmode, std::_Ios_Openmode)
operator|(_Ios_Openmode __a, _Ios_Openmode __b)
^
/usr/include/c++/4.8/bits/ios_base.h:123:3: note: no known conversion for argument 1 from ‘Kakoune::Vector<std::pair<Kakoune::StringView, Kakoune::StringView> > {aka std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >}’ to ‘std::_Ios_Openmode’
/usr/include/c++/4.8/bits/ios_base.h:81:3: note: constexpr std::_Ios_Fmtflags std::operator|(std::_Ios_Fmtflags, std::_Ios_Fmtflags)
operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
^
/usr/include/c++/4.8/bits/ios_base.h:81:3: note: no known conversion for argument 1 from ‘Kakoune::Vector<std::pair<Kakoune::StringView, Kakoune::StringView> > {aka std::vector<std::pair<Kakoune::StringView, Kakoune::StringView>, Kakoune::Allocator<std::pair<Kakoune::StringView, Kakoune::StringView>, (Kakoune::MemoryDomain)0> >}’ to ‘std::_Ios_Fmtflags’
make[1]: *** [.alias_registry.opt.o] Error 1
make[1]: Leaving directory `/tmp/tmp.cARrc1zi9D/kakoune-2016.12.14.377046e'
dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
@Thaelz I think the error you get is due to a too old g++, you need at least g++ 5 installed. Here it seems the compilation is done with gcc 4.8.
@mawww You got it ! 4.8.5
@trans Try this, if g++ --version gives a version number < 5
sudo apt-get install g++-5
cd /usr/bin
sudo mv g++ g++-4
sudo ln -s g++-5 g++
Instead of messing with the executables in /usr/bin, I'd just set the CC and CXX environment variables to point to gcc-5 and g++-5
@trans you do not need elevated privilege to build a package, check the logs instead to get the error.
@trans is there any more error messages ?
For an ubuntu packages, we need somebody to take care of that, I dont use ubuntu or debian based distro myself, so I cant really manage a package.
@mawww I started an issue for a Ubuntu/Deb package: #1004.
What are the errors that make the make_deb script fail? Did you manage to run it till the end?
Same as I get with a regular make build, a lot of errors similar to this:
/usr/include/boost/regex/v4/perl_matcher.hpp:207: undefined reference to boost::c_regex_traits<wchar_t>::transform[abi:cxx11](wchar_t const*, wchar_t const*)'
This is on an Ubuntu 16.04 LTS system. I suspect there's a problem with the libboost-regex1.* packages. this is what I have installed:
libboost-regex1.55-dev:amd64
libboost-regex1.55.0:amd64
libboost-regex1.58.0:amd64
So it's a basic conflict between headers and lib of libboost-regex. apt-get refuses to upgrade to libboost-regex1.58-dev, but aptitude works it out just fine:
sudo aptitude install libboost-regex-dev
kakoune builds just fine now.
Even with ascii2doc installed, ./contrib/make_deb.sh fails here:
jvoisin@mim 11:20 ~/Dev/kakoune ./contrib/make_deb.bash -e [email protected] -f jvoisin
Detected path to the kakoune project: /home/jvoisin/Dev/kakoune
Path to the temporary directory: /tmp/tmp.9THmjVkpvs
Path to the work directory: /tmp/tmp.9THmjVkpvs/kakoune-2016.12.17.a0c787e
Version of the package: 2016.12.17.a0c787e
Copying the source over to the work directory
Copying the tests over to the temporary directory
Copying additional directories over to the temporary directory
Creating a symlink in the source code to allow tests to run
Copying the license file in the source directory
Changing directory to the temporary one
Deactivating the debug mode in the makefile
Disabling copying the README file to the doc directory
Setting the prefix of the installation procedure
Removing debug symbols from the compilation flags
Creating a tar archive of the code
Compressing the tar archive of the code
Changing directory to the work one
Package maintainer info: jvoisin ([email protected])
Path to the license file:
Initializing package creation
I: set parameters
I: sanity check of parameters
W: -p "kakoune" != auto set value ""
I: pkg="kakoune", ver="2016.12.17.a0c787e", rev="1"
I: *** start packaging in "kakoune-2016.12.17.a0c787e". ***
I: provide kakoune_2016.12.17.a0c787e.orig.tar.gz for non-native Debian package
I: pwd = "/tmp/tmp.9THmjVkpvs"
I: $ ln -sf kakoune-2016.12.17.a0c787e.tar.gz kakoune_2016.12.17.a0c787e.orig.tar.gz
I: pwd = "/tmp/tmp.9THmjVkpvs/kakoune-2016.12.17.a0c787e"
I: parse binary package settings: kakoune:bin
I: binary package=kakoune Type=bin / Arch=any M-A=foreign
I: analyze the source tree
I: build_type = make
I: scan source for copyright+license text and file extensions
I: 55 %, ext = c
I: 22 %, ext = o
I: 22 %, ext = d
I: 0 %, ext = swp
I: 0 %, ext = gdbinit
I: check_all_licenses
I: .......................................................................................................................................................................
I: check_all_licenses completed for 167 files.
I: bunch_all_licenses
I: format_all_licenses
I: make debian/* template files
I: single binary package
I: debmake -x "1" ...
I: creating => debian/control
I: creating => debian/copyright
I: substituting => /usr/share/debmake/extra0/rules
I: creating => debian/rules
I: substituting => /usr/share/debmake/extra0/changelog
I: creating => debian/changelog
I: substituting => /usr/share/debmake/extra1/watch
I: creating => debian/watch
I: substituting => /usr/share/debmake/extra1/compat
I: creating => debian/compat
I: substituting => /usr/share/debmake/extra1/README.Debian
I: creating => debian/README.Debian
I: substituting => /usr/share/debmake/extra1source/format
I: creating => debian/source/format
I: substituting => /usr/share/debmake/extra1source/local-options
I: creating => debian/source/local-options
I: substituting => /usr/share/debmake/extra1patches/series
I: creating => debian/patches/series
I: run "debmake -x2" to get more template files
I: $ wrap-and-sort
Adding the homepage to the control file
Adding the dependencies to the control file
List of dependencies that will be added: libboost-all-dev (>= 1.50), libncursesw5-dev (>= 5.3)
Adding a description to the control file
Adding the version of the package to the control file
Assigning a section to the control file
Adding asciidoc to the list of build dependencies
Adding package recommendations
Modifying the source in the copyright file
Modifying the license in the copyright file
Generating an NROFF man page
a2x: ERROR: "xsltproc" --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0 "/etc/asciidoc/docbook-xsl/manpage.xsl" "/tmp/tmp.9THmjVkpvs/doc/kak.1.xml" returned non-zero exit status 127
zsh: exit 1 ./contrib/make_deb.bash -e [email protected] -f jvoisin
Try to call a2x manually on doc/kak.1.txt.
jvoisin@mim 14:27 ~/Dev/kakoune a2x --verbose doc/kak.1.txt
a2x: args: ['--verbose', 'doc/kak.1.txt']
a2x: resource files: []
a2x: resource directories: ['/etc/asciidoc/images', '/etc/asciidoc/stylesheets']
a2x: executing: "/usr/bin/asciidoc" --backend docbook -a "a2x-format=pdf" --verbose --out-file "/home/jvoisin/Dev/kakoune/doc/kak.1.xml" "/home/jvoisin/Dev/kakoune/doc/kak.1.txt"
asciidoc: reading: /etc/asciidoc/asciidoc.conf
asciidoc: reading: /home/jvoisin/Dev/kakoune/doc/kak.1.txt
asciidoc: reading: /etc/asciidoc/docbook45.conf
asciidoc: reading: /etc/asciidoc/filters/code/code-filter.conf
asciidoc: reading: /etc/asciidoc/filters/source/source-highlight-filter.conf
asciidoc: reading: /etc/asciidoc/filters/graphviz/graphviz-filter.conf
asciidoc: reading: /etc/asciidoc/filters/music/music-filter.conf
asciidoc: reading: /etc/asciidoc/filters/latex/latex-filter.conf
asciidoc: reading: /etc/asciidoc/lang-en.conf
asciidoc: writing: /home/jvoisin/Dev/kakoune/doc/kak.1.xml
a2x: executing: "xmllint" --nonet --noout --valid "/home/jvoisin/Dev/kakoune/doc/kak.1.xml"
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
/home/jvoisin/Dev/kakoune/doc/kak.1.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
^
/home/jvoisin/Dev/kakoune/doc/kak.1.xml:6: validity error : Validation failed: no DTD found !
<article lang="en">
^
a2x: ERROR: "xmllint" --nonet --noout --valid "/home/jvoisin/Dev/kakoune/doc/kak.1.xml" returned non-zero exit status 4
zsh: exit 1 a2x --verbose doc/kak.1.txt
jvoisin@mim 14:27 ~/Dev/kakoune
According to other issues, installing libxml2-utils and xsltproc will solve this issue.
What's weird is that the Makefile explicitely disables linting for the XML output, so you shouldn't need those packages in the first place.
This fixed the issue, but it should be documented :)
This is an issue related to Ubuntu itself, as like I said, the Makefile disables XML linting, and asciidoc doesn't have those packages as dependencies on Ubuntu.
I'm leaving this comment here since this seems to be a generic deb packaging issue.
I just built kakoune eace7e0 on Ubuntu 16.04, I had to install a couple dependencies not strictly related to debian package building, namely asciidoc, libboost-dev, libncurses5-dev, libncursesw5-dev and libboost-regex-dev.
While installing the resulting deb, dpkg asked for libboost-all-dev.
Having a -dev package dependency for runtime seems odd, considering that only libboost-regex-dev was required for building and considering kakoune is an editor. Is this on purpose?
@anddam my bad, it's indeed a mistake. I've been thinking about redoing this whole thing (maybe even drop the script in favor of actual debian package files), but in the meantime you can install the package and ignore the dependencies.
@anddam the make_deb.bash is now deprecated, I've written proper debian files in a seperate repository, c.f. #1300.
I think this issue can be closed.
Should the Ubuntu installation instructions in the readme be changed/removed if they don't currently work? Or maybe I misunderstood @lenormf. Following the current instructions exactly, I get this:
$ make
g++ -O3 -pedantic -std=c++17 -g -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-address -MD -MP -MF .alias_registry.opt.d -c -o .alias_registry.opt.o alias_registry.cc
In file included from unicode.hh:8:0,
from utf8.hh:5,
from string.hh:7,
from alias_registry.hh:5,
from alias_registry.cc:1:
ranges.hh:197:47: error: ‘is_same_v’ is not a member of ‘std’
struct is_pointer_like<T, U, std::enable_if_t<std::is_same_v<std::decay_t<decltype(*std::declval<U>())>, std::d
^
ranges.hh:197:47: error: ‘is_same_v’ is not a member of ‘std’
ranges.hh:197:120: error: template argument 1 is invalid
ike<T, U, std::enable_if_t<std::is_same_v<std::decay_t<decltype(*std::declval<U>())>, std::decay_t<T>>>> : std:
^
ranges.hh:197:35: error: template argument 3 is invalid
struct is_pointer_like<T, U, std::enable_if_t<std::is_same_v<std::decay_t<decltype(*std::declval<U>())>, std::d
^
ranges.hh:197:122: error: expected unqualified-id before ‘>’ token
e<T, U, std::enable_if_t<std::is_same_v<std::decay_t<decltype(*std::declval<U>())>, std::decay_t<T>>>> : std::t
^
In file included from unicode.hh:8:0,
from utf8.hh:5,
from string.hh:7,
from alias_registry.hh:5,
from alias_registry.cc:1:
ranges.hh:197:144: warning: extra ‘;’ [-Wpedantic]
:enable_if_t<std::is_same_v<std::decay_t<decltype(*std::declval<U>())>, std::decay_t<T>>>> : std::true_type {};
^
ranges.hh: In lambda function:
ranges.hh:207:16: error: expected ‘(’ before ‘constexpr’
if constexpr (is_pointer_like<T, Arg>::value)
^
ranges.hh:209:13: error: ‘else’ without a previous ‘if’
else
^
ranges.hh: In lambda function:
ranges.hh:213:12: error: expected ‘(’ before ‘constexpr’
if constexpr (std::is_member_function_pointer_v<Member>)
^
ranges.hh:215:9: error: ‘else’ without a previous ‘if’
else
^
Makefile:102: recipe for target '.alias_registry.opt.o' failed
make: *** [.alias_registry.opt.o] Error 1
$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
The actual commands for building on Ubuntu are correct, but the bit about Ubuntu 16.04 is incorrect. A bit further up the page it says Kakoune requires a C++17 compiler, like GCC >= 7. GCC 5.4 isn't nearly enough, sadly.
@Screwtapello Ah, thanks! I missed that. Upgraded gcc and that fixed it. :+1:
I also had a problem with installing kakoune which was fixed by using a newer version of g++. Maybe this should be in the tips for Ubuntu in the README?
Most helpful comment
The actual commands for building on Ubuntu are correct, but the bit about Ubuntu 16.04 is incorrect. A bit further up the page it says Kakoune requires a C++17 compiler, like GCC >= 7. GCC 5.4 isn't nearly enough, sadly.