Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run autogen.sh on ubuntu 20.04 #12

Closed
pieper opened this issue Jan 29, 2022 · 13 comments
Closed

can't run autogen.sh on ubuntu 20.04 #12

pieper opened this issue Jan 29, 2022 · 13 comments
Assignees
Labels
installation Problems building or installing the library

Comments

@pieper
Copy link
Member

pieper commented Jan 29, 2022

$ ./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.

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force --warnings=no-portability -I m4
aclocal: warning: couldn't open directory 'm4': No such file or directory
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
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
@jcupitt
Copy link
Collaborator

jcupitt commented Jan 30, 2022

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.

@pieper
Copy link
Member Author

pieper commented Jan 30, 2022

Thanks for checking. I installed build-essential and autoconf. I'm not sure what else would be expected.

@jcupitt
Copy link
Collaborator

jcupitt commented Jan 30, 2022

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.

@pieper
Copy link
Member Author

pieper commented Jan 30, 2022

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.

@pieper
Copy link
Member Author

pieper commented Jan 30, 2022

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

@jcupitt
Copy link
Collaborator

jcupitt commented Jan 30, 2022

Did you install autotools-dev? That's needed too.

@pieper
Copy link
Member Author

pieper commented Jan 30, 2022

Apparently it was already installed and I get the same error after trying to install it.

@hackermd
Copy link
Collaborator

@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.

@hackermd hackermd added the installation Problems building or installing the library label Jan 30, 2022
@pieper
Copy link
Member Author

pieper commented Jan 30, 2022

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.

@jcupitt
Copy link
Collaborator

jcupitt commented Jan 30, 2022

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

@hackermd
Copy link
Collaborator

@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?

@jcupitt
Copy link
Collaborator

jcupitt commented Jan 30, 2022

Sure, go ahead. My dockerfile doesn't mean this repo is public, of course.

@hackermd hackermd self-assigned this Jan 30, 2022
@hackermd
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Problems building or installing the library
Projects
None yet
Development

No branches or pull requests

3 participants