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

Building py-libxml2 fails (Ubuntu 22.04, unprivileged pkgsrc), because of the use of wrong headers (?) #150

Open
algor512 opened this issue Sep 22, 2024 · 2 comments

Comments

@algor512
Copy link

On Ubuntu 22.04, the installation crashes when the libxml2-dev package is installed. Removing it
makes the installation succeed. I noticed that in the former case the compilation log contains the
following lines:

cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/usr/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml.c -o build/temp.linux-x86_64-cpython-312/libxml.o
cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/usr/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml2-py.c -o build/temp.linux-x86_64-cpython-312/libxml2-py.o

While in the latter case it contains

cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/home/algor/tmp_pkg/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml.c -o build/temp.linux-x86_64-cpython-312/libxml.o
cc -fno-strict-overflow -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include -DNCURSES_WIDECHAR=1 -I/home/algor/tmp_pkg/include/ncurses -I/home/algor/tmp_pkg/include/db4 -O2 -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -I/usr/include -I/home/algor/tmp_pkg/include/python3.12 -I/home/algor/tmp_pkg/include -fPIC -D_REENTRANT=1 -I/home/algor/tmp_pkg/include/libxml2 -I/home/algor/tmp_pkg/include/python3.12 -c libxml2-py.c -o build/temp.linux-x86_64-cpython-312/libxml2-py.o

As you can see, in the former case it contains -I/usr/include/libxml2 and it presumabely makes it
fail. I have the line PREFER_PKGSRC=yes in my mk.conf.

@sskras
Copy link

sskras commented Sep 23, 2024

@algor512, which commit is that, please?

@algor512
Copy link
Author

@sskras sorry, I forgot to indicate that: I use the current trunk, so the commit c8e9012.

netbsd-srcmastr pushed a commit that referenced this issue Sep 23, 2024
# ps 1.7.7

* `ps_cpu_times()` values are now correct on newer arm64 macOS.

# ps 1.7.6

* `ps_name()` now does not fail in the rare case when `ps_cmdline()` returns an empty vector (#150).

* `ps_system_cpu_times()` now returns CPU times divided by the HZ as reported by CLK_TCK, in-line with other OS's and the per-process version. (#144, @michaelwalshe).
netbsd-srcmastr pushed a commit that referenced this issue Oct 18, 2024
# evaluate 1.0.1

* Fix buglet revealed when by using `rlang::abort()` inside of `evaluate()`.

# evaluate 1.0.0

* Setting `ACTIONS_STEP_DEBUG=1` (as in a failing GHA workflow) will
  automatically set `log_echo` and `log_warning` to `TRUE` (#175).

* evaluate works on R 3.6.0 once again.

* `evaluate()` improvements:

  * Now terminates on the first error in a multi-expression input, i.e.
    `1;stop('2');3` will no longer evaluate the third component. This
    matches console behaviour more closely.

  * Calls from conditions emitted by top-level code are automatically stripped
    (#150).

  * Result has a class (`evaluate_evaluation`/`list`) with a basic print method.

  * Plots created before messages/warnings/errors are correctly captured (#28).

* Handler improvements:

  * The default `value` handler now evaluates `print()` in a child of the
    evaluation environment. This largely makes evaluate easier to test, but
    should make defining S3 methods for print a little easier (#192).

  * The `source` output handler is now passed the entire complete input
    expression, not just the first component.

* `evalute(include_timing)` has been deprecated. I can't find any use of it on
  GitHub, and it adds substantial code complexity for little gain.

* `is.value()` has been removed since it tests for an object that evaluate
  never creates.

* New `local_reproducible_output()` helper that sets various options and env
  vars to help ensure consistency of output across environments.

* `parse_all()` adds a `\n` to the end of every line, even the last one if it
  didn't have one in the input. Additionally, it no longer has a default
  method, which will generate better errors if you pass in something unexpected.

* New `trim_intermediate_plots()` drops intermediate plots to reveal the
  complete/final plot (#206).

* `watchout()` is no longer exported; it's really an implementation detail that
  should never have been leaked to the public interface.

# evaluate 0.24.0

* The `source` output handler can now take two arguments (the unparsed `src`
  and the parsed `call`) and choose to affect the displayed source.
* The package now depends on R 4.0.0 in order to decrease our maintenance burden.
msk pushed a commit to msk/pkgsrc that referenced this issue Oct 18, 2024
This is a point release intended to clear up a couple of CVEs and
apply point fixes that have been accumulating since 5.2.1

There are a few unresolved (but minor) memory leaks related to design
issues in the API that still need to be resolved. Expect those fixes
in the next release.

Code Fixes
----------

* Fixes for CVE-2023-48161, CVE-2022-28506,

* Address SF issue NetBSD#138 Documentation for obsolete utilities still installed

* Address SF issue NetBSD#139: Typo in "LZW image data" page ("110_2 = 4_10")

* Address SF issue NetBSD#140: Typo in "LZW image data" page ("LWZ")

* Address SF issue NetBSD#141: Typo in "Bits and bytes" page ("filed")

* Note as already fixed SF issue NetBSD#143: cannot compile under mingw

* Address SF issue NetBSD#144: giflib-5.2.1 cannot be build on windows and other platforms using c89

* Address SF issue NetBSD#145: Remove manual pages installation for binaries that are not installed too

* Address SF issue NetBSD#146: [PATCH] Limit installed man pages to binaries, move giflib to section 7

* Address SF issue NetBSD#147 [PATCH] Fixes to doc/whatsinagif/ content

* Address SF issue NetBSD#148: heap Out of Bound Read in gif2rgb.c:298 DumpScreen2RGB

* Declared no-info on SF issue NetBSD#150: There is a denial of service vulnerability in GIFLIB 5.2.1

* Declared Won't-fix on SF issue 149: Out of source builds no longer possible

* Address SF issue NetBSD#151: A heap-buffer-overflow in gif2rgb.c:294:45

* Address SF issue #152: Fix some typos on the html documentation and man pages

* Address SF issue #153: Fix segmentation faults due to non correct checking for args

* Address SF issue #154: Recover the giffilter manual page

* Address SF issue #155: Add gifsponge docs

* Address SF issue #157: An OutofMemory-Exception or Memory Leak in gif2rgb

* Address SF issue #158: There is a null pointer problem in gif2rgb

* Address SF issue #159 A heap-buffer-overflow in GIFLIB5.2.1 DumpScreen2RGB() in gif2rgb.c:298:45

* Address SF issue #163: detected memory leaks in openbsd_reallocarray giflib/openbsd-reallocarray.c

* Address SF issue #164: detected memory leaks in GifMakeMapObject giflib/gifalloc.c

* Address SF issue #166: a read zero page leads segment fault in getarg.c and memory leaks in gif2rgb.c and gifmalloc.c

* Address SF issue #167: Heap-Buffer Overflow during Image Saving in DumpScreen2RGB Function at Line 321 of gif2rgb.c
netbsd-srcmastr pushed a commit that referenced this issue Nov 6, 2024
# nloptr 2.1.1

This is a patch release to work around a bug in the CRAN checks. Specifically,
one of the unit tests for the `isres()` algorithm was failing on some CRAN
builds because convergence is stochastic with slightly different results even
with the same fixed seed prior to calling the function.

# nloptr 2.1.0
This release deprecates the default behavior of the inequality equations in any
wrapper function which uses them. Currently, they are calibrated to be >= 0.
This version allows for the equations to be consistent with the main `nloptr`
function, which requires <= 0. In a future release, the default behavior will
switch to assuming the calibration is <= 0, and eventually, the >= 0 behavior
will be removed. It also includes a large number of safety and efficiency
changes, and an expansion of the unit tests to 100% coverage for all files but
one. The major changes include:

* Reversed the direction of the inequality equations `hin` and `hinjac` in the
wrapper functions which use them, bringing them into compliance with the main
`nloptr` call. This addresses
[Issue #148](astamm/nloptr#148);
* Cleaned the Hock-Schittkowski problem no. 100, Hartmann 6-dimensional, and
Powell exponential examples. This addresses
[Issue #152](astamm/nloptr#152) and
[Issue #156](astamm/nloptr#156);
* Updated roxygen version;
* Updated maintainer email;
* Deal with NA returns from `parallel::detectCores()` (contributed by @jeroen in
PR #150);
* Setup rhub v2 checks;
* Update cmake installation instructions on Mac with brew (#146);
* Allow use of equality constraints with COBYLA (#135);
* Replaced the unit testing framework of `testthat` with `tinytest` (See
[Issue #136](astamm/nloptr#136));
* Brought coverage of `is.nloptr` to 100%. The only file not completely covered
by unit tests is `nloptr.c`. The uncovered calls are error messages which get
trapped by tests in R before the call gets to C;
* Linted package for code correctness and consistency;
* Updated vignette, DESCRIPTION, and NEWS;
* Updated package website to use bootstrap 5;
* Expanded unit tests: coverage now over 97% with no file below 90%;
* Removed forcing `C++11`;
* Added safety checks to C code;
* Added many safety and efficiency enhancements to R code;
* Most R code style made self-consistent;
* Updated documentation and messages for accuracy and mathematical formatting
* Updated Github actions;
* Some bugfixes (e.g. in `isres` or the warning in `nl.grad`).
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

2 participants