Closed pieper closed 2 years ago
Hi @pieper, it should work, I see:
$ git clone git@github.com:hackermd/libdicom.git
Cloning into 'libdicom'...
...
$ cd libdicom/
$ git checkout dev
Branch 'dev' set up to track remote branch 'dev' from 'origin'.
Switched to a new branch 'dev'
$ ./autogen.sh
*** WARNING: I am going to run 'configure' with no arguments.
*** If you wish to pass any to it, please specify them on the
*** './autogen.sh' command line.
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
config.status: executing depfiles commands
config.status: executing libtool commands
Now type 'make' to compile dicom
$
I tried master as well and that worked too.
Perhaps your system is missing parts of autotools? You'll need quite a few dev packages to be able to rebuild the configure system.
Thanks for checking. I installed build-essential and autoconf. I'm not sure what else would be expected.
You'll need libtool at least.
Once this thing hits 1.0 there will be a tarball with a pre-built configure
, so hopefully this won't be an issue.
This isn't in my critical path, just reporting. I was able to build on a mac and do what I needed. Thanks for the help.
Out of curiosity I installed libtool but there is still something missing.
$ ./autogen.sh
*** WARNING: I am going to run 'configure' with no arguments.
*** If you wish to pass any to it, please specify them on the
*** './autogen.sh' command line.
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force --warnings=no-portability -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force --warnings=no-portability
configure.ac:60: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Did you install autotools-dev
? That's needed too.
Apparently it was already installed and I get the same error after trying to install it.
@pieper you may want to take a look at the Dockerfile
: https://github.com/hackermd/libdicom/blob/736d43f013af55ae80815b2a63419046d12cdeca/Dockerfile#L7-L14
I needed quite a few dependencies to build the library and run the tests. The Dockerfile
is for Debian rather than Ubuntu, so there may be some differences in package names, but it hopefully points you in the right direction.
Thanks @hackermd, this set of installs fixed it.
sudo apt-get install autogen dh-autoreconf build-essential check dumb-init libtool pkg-config shtool
After that there's a build error about stncpy that I can make a new issue for.
Ah, found it, you need to install pkg-config
.
Here's a dockerfile that builds libdicom on ubuntu 20.04:
https://github.com/jcupitt/docker-builds/tree/master/libdicom-ubuntu20.04
@jcupitt since you provide a link to this repository in your public repository, we may want to open this one up to the public, too. Any concerns?
Sure, go ahead. My dockerfile doesn't mean this repo is public, of course.
Alright! Repo is now public. I also uploaded the documentation to readthedocs.
@pieper the documentation on build dependencies is included in the online documentation: https://libdicom.readthedocs.io/en/latest/installation.html#build-dependencies