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

Compilation fails on alpine linux 3.2 #44

Closed
lxe opened this Issue Aug 27, 2015 · 5 comments

Comments

Projects
None yet
5 participants
@lxe
Copy link

lxe commented Aug 27, 2015

I'm running into the following issue when installing on alpine 3.2 (docker https://hub.docker.com/_/alpine/):

 /usr/include/linux/prctl.h:133:8: error: redefinition of 'struct prctl_mm_map'
     struct prctl_mm_map {
            ^
    In file included from src/spt_status.c:57:0:
    /usr/include/sys/prctl.h:88:8: note: originally defined here
     struct prctl_mm_map {
            ^
    error: command 'gcc' failed with exit status 1

Removing line

#include <linux/prctl.h>
seems to fix this.

@tonyseek

This comment has been minimized.

Copy link

tonyseek commented Mar 21, 2016

It seems to be similar to seccomp/libseccomp#19

@jirutka

This comment has been minimized.

Copy link

jirutka commented Mar 23, 2016

I have the same problem, #include <linux/prctl.h> should be removed IMO.

dvarrazzo added a commit that referenced this issue Mar 23, 2016

Dropped linux/prctl.h include
Should fix issue #44, pending further tests before releasing.

Tested ok on Linux 3.13.0-74-generic x86_64.
@dvarrazzo

This comment has been minimized.

Copy link
Owner

dvarrazzo commented Mar 23, 2016

I've tested that on Ubuntu 14.04 dropping linux/prctl.h works ok. Will test on some older linux deployment and if everything is ok will make a new release.

@yegorich

This comment has been minimized.

Copy link

yegorich commented Apr 29, 2016

Having the same issue with MUSL (as described in seccomp/libseccomp#19) in Buildroot. Have also tried relative old toolchain Arago ARMv7 2011.09. py-setproctitle could be successfully compiled with both includes and without #include <linux/prctl.h>.

New release will be very appreciated.

@dvarrazzo

This comment has been minimized.

Copy link
Owner

dvarrazzo commented May 11, 2016

Tested, merged in master

@dvarrazzo dvarrazzo closed this May 11, 2016

kwlzn added a commit to pantsbuild/pants that referenced this issue Jun 29, 2016

Bump setproctitle to 1.1.10.
Bump setproctitle to 1.1.10 to pull in dvarrazzo/py-setproctitle#44 for Medium's usage of `pants` in Alpine linux containers.

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/141185236

Reviewed at https://rbcommons.com/s/twitter/r/4035/

digwanderlust added a commit to digwanderlust/pants that referenced this issue Jul 1, 2016

Prepare the 1.1.0-rc0 release
  1.1.0-rc0 (7/1/2016)
  --------------------

  This is the first `1.1.0-rc` release on the way to the `1.1.0`.

  New Features
  ~~~~~~~~~~~~

  * Subprocess clean-all
    `RB pantsbuild#4011 <https://rbcommons.com/s/twitter/r/4011>`_

  * expose products for jvm bundle create and python binary create tasks
    `RB pantsbuild#3959 <https://rbcommons.com/s/twitter/r/3959>`_
    `RB pantsbuild#4015 <https://rbcommons.com/s/twitter/r/4015>`_

  * Implement zinc `unused deps` check
    `RB pantsbuild#3635 <https://rbcommons.com/s/twitter/r/3635>`_

  API Changes
  ~~~~~~~~~~~

  * Add `is_target_root` in export
    `RB pantsbuild#4030 <https://rbcommons.com/s/twitter/r/4030>`_

  Bugfixes
  ~~~~~~~~

  * ConsoleRunner bugfix for @TestSerial and other test cleanups
    `RB pantsbuild#4026 <https://rbcommons.com/s/twitter/r/4026>`_

  New Engine Work
  ~~~~~~~~~~~~~~~

  * [engine] Proper implementation of `**` globs in the v2 engine
    `RB pantsbuild#4034 <https://rbcommons.com/s/twitter/r/4034>`_

  * [engine] Fix TargetMacro replacements of adapted aliases
    `Issue pantsbuild#3560 <https://github.com/pantsbuild/pants/issues/3560>`_
    `Issue pantsbuild#3561 <https://github.com/pantsbuild/pants/issues/3561>`_
    `RB pantsbuild#4000 <https://rbcommons.com/s/twitter/r/4000>`_

  Refactoring, Improvements, and Tooling
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  * Fix dead apidocs link for guava.
    `RB pantsbuild#4037 <https://rbcommons.com/s/twitter/r/4037>`_

  * Bump setproctitle to 1.1.10.
    `Issue pantsbuild#44 <https://github.com/dvarrazzo/py-setproctitle/issues/44>`_
    `RB pantsbuild#4035 <https://rbcommons.com/s/twitter/r/4035>`_

  * Set a default read timeout for fetching node pre-installed modules. 1 second default often fails
    `RB pantsbuild#4025 <https://rbcommons.com/s/twitter/r/4025>`_

  * Improve stderr handling for ProcessManager.get_subprocess_output().
    `RB pantsbuild#4019 <https://rbcommons.com/s/twitter/r/4019>`_

  * Add AnnotatedParallelClassesAndMethodsTest* and AnnotatedParallelMethodsTest*
    `RB pantsbuild#4027 <https://rbcommons.com/s/twitter/r/4027>`_

digwanderlust added a commit to digwanderlust/pants that referenced this issue Jul 1, 2016

Prepare the 1.1.0-rc0 release
1.1.0-rc0 (7/1/2016)
  --------------------

  This is the first `1.1.0-rc` release on the way to the `1.1.0`.

  New Features
  ~~~~~~~~~~~~

  * Subprocess clean-all
    `RB pantsbuild#4011 <https://rbcommons.com/s/twitter/r/4011>`_

  * expose products for jvm bundle create and python binary create tasks
    `RB pantsbuild#3959 <https://rbcommons.com/s/twitter/r/3959>`_
    `RB pantsbuild#4015 <https://rbcommons.com/s/twitter/r/4015>`_

  * Implement zinc `unused deps` check
    `RB pantsbuild#3635 <https://rbcommons.com/s/twitter/r/3635>`_

  API Changes
  ~~~~~~~~~~~

  * Add `is_target_root` in export
    `RB pantsbuild#4030 <https://rbcommons.com/s/twitter/r/4030>`_

  Bugfixes
  ~~~~~~~~

  * ConsoleRunner bugfix for @TestSerial and other test cleanups
    `RB pantsbuild#4026 <https://rbcommons.com/s/twitter/r/4026>`_

  New Engine Work
  ~~~~~~~~~~~~~~~

  * [engine] Proper implementation of `**` globs in the v2 engine
    `RB pantsbuild#4034 <https://rbcommons.com/s/twitter/r/4034>`_

  * [engine] Fix TargetMacro replacements of adapted aliases
    `Issue pantsbuild#3560 <https://github.com/pantsbuild/pants/issues/3560>`_
    `Issue pantsbuild#3561 <https://github.com/pantsbuild/pants/issues/3561>`_
    `RB pantsbuild#4000 <https://rbcommons.com/s/twitter/r/4000>`_

  Refactoring, Improvements, and Tooling
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  * Fix dead apidocs link for guava.
    `RB pantsbuild#4037 <https://rbcommons.com/s/twitter/r/4037>`_

  * Bump setproctitle to 1.1.10.
    `Issue pantsbuild#44 <https://github.com/dvarrazzo/py-setproctitle/issues/44>`_
    `RB pantsbuild#4035 <https://rbcommons.com/s/twitter/r/4035>`_

  * Set a default read timeout for fetching node pre-installed modules. 1 second default often fails
    `RB pantsbuild#4025 <https://rbcommons.com/s/twitter/r/4025>`_

  * Improve stderr handling for ProcessManager.get_subprocess_output().
    `RB pantsbuild#4019 <https://rbcommons.com/s/twitter/r/4019>`_

  * Add AnnotatedParallelClassesAndMethodsTest* and AnnotatedParallelMethodsTest*
    `RB pantsbuild#4027 <https://rbcommons.com/s/twitter/r/4027>`_

Testing Done:
CI pending: https://travis-ci.org/pantsbuild/pants/builds/141717353

Bugs closed: 3620

Reviewed at https://rbcommons.com/s/twitter/r/4042/

dw added a commit to zatosource/zato that referenced this issue Jan 24, 2018

GH #817 - pip - setup Travis CI and replace zc.buildout with pip
This contains everything necessary to:

    * replace zc.buildout with pip for every supported OS,
    * arrange for those OSes to be tested under Docker via Travis CI,
    * adds support for Alpine Linux to install.sh.

.travis.yml:
    The Travis CI config file, it must live in <git_root>/.travis.yml.
    The initial config arranges for our jobs to be executed with a bunch
    of different environment variables, which indirectly cause the jobs
    to run particular shell scripts under particular Docker images.

    Given MODE=packaging IMAGE=centos:7, .travis/test_packaging.sh will
    be executed, which will in turn use .travis/setup.sh to launch a
    centos:7 Docker conatiner.

    Travis is also instructed to cache the contents of /tmp/travis-cache
    between invocations with the same set of environment variables. This
    is used by setup.sh below.

.travis/:
    Travis support scripts. This directory can be renamed.

.travis/setup.sh:
    Sourced by one of the test_*.sh scripts, it exposes a 'run' macro
    to execute commands within the Docker container that it boots.
    Alternatively if IMAGE was unset, the 'run' macro executes commands
    directly against the Travis VM, which will be needed later for OS X
    support.

    When running the image, setup.sh arranges for various package
    manager cache directories to be bind-mounted out to
    /tmp/travis-cache on the host VM, and ensures permissions are
    correct for Docker and for Travis during job start/stop.

    Yum packages are specifically not cached because it triggers some
    corruption bug on CentOS.

    Finally, setup.sh ensures the various official Docker images we use
    always have sensible 'bash', 'sudo' and 'patch' commands available,
    as they are required for install.sh.

.travis/test_packaging.sh:
    The first CI mode, ensures:

    * "./install.sh" completes with exit status 0 on each supported OS.

    * "pip freeze" output exactly matches requirements.txt, with some
      exceptions for packages using sys_platform conditionals, and
      packages installed in edit mode. This mimics zc.buildout's
      "allowed-picked-versions = False" parameter.

code/_install-deb.sh:
code/_install-rhel.sh:
    * Enable "set -e" so the script fails and reports error on the first
      failing subcommand.

    * Explicitly use "python2.7" throughout. This prevents a botched
      install in places where the "python" symlink points to Python 2.6
      or 3.x.

    * Replace CURDIR with error-tolerant equivalent that ensures CWD
      install.sh exists afer we've supposedly changed directory. Fix old
      macro to handle spaces in filenames (common on OS X).

    * Remove symlink_py: we no longer use the system SciPy/NumPy,
      instead they come from binary wheels.

    * Arrange for Debian Wheezy extra repositories to be enabled,
      necessary at least for "haproxy". This is needed for the Docker
      tests, but additionally means the installation documentation can
      be simplified.

    * Remove ancient and unneeded system dependencies and add some
      required commands that were just assumed to be present in the old
      version. This was mostly SciPy build deps, but additionally some
      like "zdaemon" that have not been used in years.

    * Arrange for the latest pip and setuptools to always be installed
      using the official "get-pip.py" bootstrap script. This
      unfortunately introduces some unavoidable network IO.

    * Remove zato_extra_paths, will re-enable later. There is nothing in
      enabling-extra-libs.html that would prevent e.g. the zato CLI tool
      from manually inserting this into sys.path to maintain the
      existing behaviour.

    * Run _postinstall.sh after virtualenv is activated.

code/_postinstall.sh:
    Contains all the non-system level installation steps. It should
    always be possible to run this script without root/sudo.

    * Stamp the Git hash into release-info/revision.txt.

    * Arrange for requirements.txt to actually be pip installed,
      followed by a list of pip command lines to cause the Zato
      components to be installed, in the correct order, in edit mode
      just like in zc.buildout.

    * Symlink the virtualenv's site-packages directory to 'eggs', to
      roughly emulate the old zc.buildout "split out eggs directory"
      behaviour.

    * Set up <curdir>/bin/py to work like it used to in zc.buildout.
      This is simply a wrapper around bin/python, sys.path hacks are no
      longer necessary.

    * Replace zc.buildout's patch step with a nice simple long list of
      patch commands.

code/clean.sh:
    * Replace CURDIR with the new macro from install.sh.
    * add some new entries (get-pip.py) and sort the list of deletions.

code/install.sh:
    * Enable "set -e" so the script fails and reports error on the first
      failing subcommand.

    * Arrange for error messages to be printed on stderr.

    * Add support for Alpine and generally simplify the logic.

code/requirements.txt:
    Our plain old requirements.txt! There was much rejoicing and dancing
    in the street. Dependency additions/removals/upgrades:

    * argparse: removed, part of 2.7 stdlib
    * asn1crypto: 0.21.0 needed for cryptography 2.1.4
    * blist: 1.3.6 requested by zati-apitest
    * bzr: 2.6.0 fix spec, was "2.6"
    * cffi: 1.11.4 needed for cryptography 2.1.4
    * collective.recipe.patch: removed zc.buildout
    * coverage: 3.7.1 requested by zato-apitest
    * cryptography: 2.1.4 for manylinux binary wheels
    * Cython: 0.27.3 for manylinux binary wheels
    * datadiff: 1.1.5 requested by zato-apitest
    * gevent-pyinotifyx: unsupported on Darwin, mark Linux-only.
    * greenlet: 0.4.12 match what zc.buildout actually installed
    * hexagonit.recipe.download: removed zc.buildout
    * idna: 2.6 because >2.1 needed for cryptography 2.1.4
    * inotifyx: unsupported on Darwin, mark Linux-only.
    * numpy: 1.14.0 no longer using system NumPy
    * pyaml: 14.5.2 fix spec, was "14.05.2"
    * pysandra-unit: 0.4.1 requested by zato-apitest
    * python-keyczar: 0.71rc0: fix spec, was "0.71c"
    * requests-testadapter: 0.3.0 requested by zato-apitest
    * scipy: 1.0.0 no longer using system SciPy
    * setproctitle: 1.1.10 to fix dvarrazzo/py-setproctitle#44
    * wsgiref: removed, part of 2.7 stdlib
    * zc.buildout: removed zc.buildout
    * zc.recipe.egg: removed zc.buildout
    * zerokspot.recipe.git: removed zc.buildout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment