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

x265 doesn't compile because Illumos "ld" #455

Closed
jcea opened this issue Jan 21, 2017 · 6 comments
Closed

x265 doesn't compile because Illumos "ld" #455

jcea opened this issue Jan 21, 2017 · 6 comments

Comments

@jcea
Copy link

jcea commented Jan 21, 2017

Smart OS 2016Q4 here, 64bits.

It is using GCC 4.9.4 (automatically, I didn't choose it).

Doing bmake in multimedia/x265 I get this error:

[ 85%] Built target x265-static
Scanning dependencies of target x265-shared
[ 86%] Linking CXX shared library libx265.so
ld: fatal: option -z has illegal argument 'noexecstack'
ld: fatal: flags processing errors
collect2: error: ld returned 1 exit status


[root@PkgSrc /data/pkgsrc/multimedia/x265]# ld --version
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1754 (illumos)

I guess this is a general problem for any other package using that flag.

After editing the code to delete that option, I get another one:

[100%] Linking CXX executable x265
ld: fatal: -Bsymbolic option is incompatible with building a dynamic executable
ld: fatal: flags processing errors
collect2: error: ld returned 1 exit status
*** Error code 1

Eliminating that I get another error:

[...]
x265_interp8_hps_shuf               0x1454a3    common/CMakeFiles/common.dir/x86/ipfilter8.asm.o
x265_interp8_hps_shuf               0x14579f    common/CMakeFiles/common.dir/x86/ipfilter8.asm.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: error: ld returned 1 exit status

Here I just dropped the ball and post this issue :).

@richlowe
Copy link

relocations against read-only sections tends to be an indication of non-PIC code -- especially where that code is assembler, as I presume that is given the file name. Ideally, you'd fix the code, but -ztextoff or -ztextwarn should allow you to proceed.

The complaint about -Bsymbolic seems legitimate to me. What are you hoping it will do for you?

@jcea
Copy link
Author

jcea commented Jan 22, 2017

I am just doing a bmake to compile multimedia/x265 pkgsrc package, and my expectation is that it compile correctly and cleanly. Currently SmartOS pkg doesn't distribute the binary, but pkgsrc contains the source ready to be compiled. Most of the time this is because licensing, patents, etc. Check the situation, for instance, with "mplayer".

The usual approach is for the user to compile the code personally, but in this case (x265) it doesn't work.

My expectation is to bmake to success.

@mamash
Copy link

mamash commented Jan 22, 2017

There are likely silly expectations about the build toolchain in the x265 Makefiles , e.g. GNU linker is assumed.

@mamash
Copy link

mamash commented Jan 22, 2017

The workaround is to kill the source/CMakeLists.txt line that adds "-Wl,-Bsymbolic,-znoexecstack" to make things work for the Illumos linker, and add -DENABLE_ASSEMBLY=OFF to CMAKE_ARGS to avoid the relocations problem.

@richlowe
Copy link

Presuming the hand-rolled assembler is actually beneficial, I'd recommend -ztextoff rather than disabling its use.

@mamash
Copy link

mamash commented Feb 13, 2017

Fix from the linked PR committed to pkgsrc trunk.

jperkin pushed a commit that referenced this issue Mar 20, 2017
* pkgsrc change: add pkg_alternatives support.

0.19.4, release 2016-11-28

* Rename Thor::Base#thor_reserved_word? to #is_thor_reserved_word?

0.19.3, release 2016-11-27

* Output a warning instead of raising an exception when a default option value
  doesn't match its specified type

0.19.2, release 2016-11-26

* Fix bug with handling of colors passed to ask (and methods like yes? and no?
  which it underpins)
* Allow numeric arguments to be negative
* Ensure that default option values are of the specified type (e.g. you can't
  specify "foo" as the default for a numeric option), but make symbols and
  strings interchangeable
* Add Thor::Shell::Basic#indent method for intending output
* Fix remove_command for an inherited command (see #451)
* Allow hash arguments to only have each key provided once (see #455)
* Allow commands to disable class options, for instance for "help" commands
  (see #363)
* Do not generate a negative option (--no-no-foo) for already negative boolean
  options (--no-foo)
* Improve compatibility of Thor::CoreExt::HashWithIndifferentAccess with Ruby
  standard library Hash
* Allow specifying a custom binding for template evaluation (e.g. #key? and
  #fetch)
* Fix support for subcommand-specific "help"s
* Use a string buffer when handling ERB for Ruby 2.3 compatibility
* Update dependencies
jperkin pushed a commit that referenced this issue Apr 27, 2017
2.7.0
-----

- #p450: Stop after the first installdeps and first testenv create hooks
  succeed.
- #271 and #464: Improve environment information for users.
- #464: Fix incorrect egg-info location for modified package_dir in setup.py.
- #431: Add 'LANGUAGE' to default passed environment variables.
- #455: Add a Vagrantfile with a customized Arch Linux box for local testing.
- #454: Revert #407, empty commands is not treated as an error.
- #446: (infrastructure) Travis CI tests for tox now also run on OS X now.

2.6.0
-----

- add "alwayscopy" config option to instruct virtualenv to always copy
  files instead of symlinking.
- pass setenv variables to setup.py during a usedevelop install.
- replace all references to testrun.org with readthedocs ones.
- fix #323 by avoiding virtualenv14 is not used on py32
- add Python 3.6 to envlist and CI.
- fix glob resolution from TOX_TESTENV_PASSENV env variable

2.5.0
-----

- slightly backward incompatible: fix issue310: the {posargs} substitution
  now properly preserves the tox command line positional arguments. Positional
  arguments with spaces are now properly handled.
- fix #359: add COMSPEC to default passenv on windows.
- add support for py36 and py37 and add py36-dev and py37(nightly) to
  travis builds of tox.
- fix #348: add py2 and py3 as default environments pointing to
  "python2" and "python3" basepython executables.  Also fix #347 by
  updating the list of default envs in the tox basic example.
- make "-h" and "--help-ini" options work even if there is no tox.ini,
- add {:} substitution, which is replaced with os-specific path
  separator
- fix #305: ``downloadcache`` test env config is now ignored as pip-8
  does caching by default.
- output from install command in verbose (-vv) mode is now printed to console instead of
  being redirected to file
- fix #399.  Make sure {envtmpdir} is created if it doesn't exist at the
  start of a testenvironment run.
- fix #316: Lack of commands key in ini file is now treated as an error.
  Reported virtualenv status is 'nothing to do' instead of 'commands
  succeeded', with relevant error message displayed.

2.4.1
-----

- fix issue380: properly perform substitution again.

2.4.0
-----

- remove PYTHONPATH from environment during the install phase because a
  tox-run should not have hidden dependencies and the test commands will also
  not see a PYTHONPATH.
- fix issue352: prevent a configuration where envdir==toxinidir and
  refine docs to warn people about changing "envdir".
- fix issue375, fix issue330: warn against tox-setup.py integration as
  "setup.py test" should really just test with the current interpreter.
- fix issue302: allow cross-testenv substitution where we substitute
  with ``{x,y}`` generative syntax.
- fix issue212: allow escaping curly brace chars "\{" and "\}" if you need the
  chars "{" and "}" to appear in your commands or other ini values.
- addresses issue66: add --workdir option to override where tox stores its ".tox" directory
  and all of the virtualenv environment.
- introduce per-venv list_dependencies_command which defaults
  to "pip freeze" to obtain the list of installed packages.
- close issue66: add documentation to jenkins page on how to avoid
  "too long shebang" lines when calling pip from tox.
- new list_dependencies_command to influence how tox determines
  which dependencies are installed in a testenv.
- (experimental) New feature: When a search for a config file fails, tox tries loading
  setup.cfg with a section prefix of "tox".
- fix issue275: Introduce hooks ``tox_runtest_pre``` and
  ``tox_runtest_post`` which run before and after the tests of a venv,
  respectively.
- fix issue317: evaluate minversion before tox config is parsed completely.
- added the "extras" environment option to specify the extras to use when doing the
  sdist or develop install.
- use pytest-catchlog instead of pytest-capturelog (latter is not
  maintained, uses deprecated pytest API)

2.3.2
-----

- fix issue314: fix command invocation with .py scripts on windows.
- fix issue279: allow cross-section substitution when the value contains
  posargs.

2.3.1
-----

- fix issue294: re-allow cross-section substitution for setenv.

2.3.0
-----

- DEPRECATE use of "indexservers" in tox.ini.
- fix issue285: make setenv processing fully lazy to fix regressions
  of tox-2.2.X and so that we can now have testenv attributes like
  "basepython" depend on environment variables that are set in
  a setenv section.
- allow "#" in commands.
- fix issue289: fix build_sphinx target
- fix issue252: allow environment names with special characters.
- introduce experimental tox_testenv_create(venv, action) and
  tox_testenv_install_deps(venv, action) hooks to allow
  plugins to do additional work on creation or installing
  deps.
- internal: push some optional object creation into tests because
  tox core doesn't need it.

2.2.1
-----

- fix bug where {envdir} substitution could not be used in setenv
  if that env value is then used in {basepython}.

2.2.0
-----

- fix issue265 and add LD_LIBRARY_PATH to passenv on linux by default
  because otherwise the python interpreter might not start up in
  certain configurations (redhat software collections).
- fix issue246: fix regression in config parsing by reordering
  such that {envbindir} can be used again in tox.ini.
- fix issue99: the {env:...} substitution now properly uses environment
  settings from the ``setenv`` section.
- fix issue281: make --force-dep work when urls are present in
  dependency configs.
- fix issue174: add new ``ignore_outcome`` testenv attribute which
  can be set to True in which case it will produce a warning instead
  of an error on a failed testenv command outcome.
- fix issue280: properly skip missing interpreter if
  {envsitepackagesdir} is present in commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants