GithubHelp home page GithubHelp logo

Comments (6)

rogpeppe avatar rogpeppe commented on July 26, 2024

I tried to run autoconf under Mac OS X 14.1.0 and got errors about undefined macros (AM_INIT_AUTOMAKE, AM_PATH_PYTHON, AC_PYTHON_DEVEL and AM_CONDITIONAL)

As usual the whole autoconf system is almost impossible to debug.

I also tried to get a bit further with compiling under Ubuntu 14.04 by defining a getrandom function that read from /dev/urandom. I got a simple C program working OK, but then I was unable to build the bindings/python code. I get the following cython error:

% make distdir
  PYX      bindings/python/macaroons.c

Error compiling Cython file:
------------------------------------------------------------
...
        MACAROON_V1
        MACAROON_V2
        MACAROON_V2J
    cdef macaroon_format MACAROON_LATEST
    cdef macaroon_format MACAROON_LATEST_JSON
    size_t macaroon_serialize_size_hint(const macaroon* M, macaroon_format f);
                                                                            ^
------------------------------------------------------------

bindings/python/macaroons.pyx:81:77: Syntax error in C variable declaration
make: *** [bindings/python/macaroons.c] Error 1

Unfortunately I'm not familiar enough with cython to know what the problem is here.

from libmacaroons.

rescrv avatar rescrv commented on July 26, 2024

There are installation instructions in the README. I'll expand them to include more details. Since the last release, I added a dependency on libbsd. This is a bsd compatibility layer on Linux, and is not required on BSD. The portability error you encountered is because that library is not installed. I'll add instructions for this into the README.

I'll also lift the loop declarations to make it compile on 14.04. It compiled on newer GCC without issue, so perhaps they've set C99 as standard between the two? In any case, it should work on both, and I'll test it on 14.04.

The problems on OS X stem from not having Automake installed (AM_INIT_AUTOMAKE/AM_CONDITIONAL) and not having autoconf-archive installed (AC_PYTHON_DEVEL).

The Cython problem is likely the "const" literal on that line. Old versions of Cython don't like const.

One of the advantages of Autoconf (and the reason I use it) is that you can build a self-contained tarball that only relies on basic POSIX. I've taken the latest source and put it here: http://rescrv.net/libmacaroons-0.4.dev.tar.gz (it's a snapshot of 2aca740, and won't necessarily follow HEAD). This will allow you to skip autoconf if you'd prefer to avoid it. It also contains the C file generated by Cython and will skip invoking Cython unless you modify the PYX.

In short, my TODO is:

  • Mention libbsd in installation section in the README
  • Mention autoconf setup in the README
  • Add configure-time check for libbsd or BSD OS and warn the user at that time so "portability error" only shows to the user when something unaccounted for happens.
  • Lift loop declarations
  • Make Cython files compatible with 14.04's version and the latest Cython

from libmacaroons.

rescrv avatar rescrv commented on July 26, 2024

Everything should now work as expected on Ubuntu 14.04. I didn't test other Ubuntu versions, but it does compile on a newer distro and 14.04, so I don't anticipate much trouble on other distributions.

from libmacaroons.

iambibhas avatar iambibhas commented on July 26, 2024

@rescrv Hi, Is it possible to have an easier installation and distribution process? What is needed to push to ubuntu main repo or maintain a PPA on launchpad? Is there anything blocking the process?

from libmacaroons.

iambibhas avatar iambibhas commented on July 26, 2024

For me, Linux Mint 18, based on ubuntu 16.04, make fails because I don't have cython installed, I think.

-> % make
make --no-print-directory all-am
  PYX      bindings/python/macaroons.c
/bin/bash: cython: command not found
Makefile:1434: recipe for target 'bindings/python/macaroons.c' failed
make[1]: *** [bindings/python/macaroons.c] Error 127
Makefile:592: recipe for target 'all' failed
make: *** [all] Error 2

from libmacaroons.

rescrv avatar rescrv commented on July 26, 2024

@iambibhas If you build a tarball with make distcheck on one machine, machines building from this tarball should not require cython. I explicitly don't include it in the configure.ac check as it is not needed by end-users.

Nothing blocks the process of creating a PPA, but nothing is driving it either. Packaging in compliance with any distribution has never been my strong suit, and most distributions prefer upstream vendors didn't try to take on the role of package maintainer too.

I'm happy to answer questions related to packaging if someone does pick it up.

from libmacaroons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.