Because xml >=4.4.0 depends on petitparser ^3.1.0 and xml >=3.7.0 <4.4.0 depends on petitparser ^3.0.0, xml >=3.7.0 requires petitparser ^3.0.0 - flutter-dependencies

[flutter_application] flutter pub get
Running "flutter pub get" in flutter_application...
Because xml >=4.4.0 depends on petitparser ^3.1.0 and xml >=3.7.0 <4.4.0 depends on petitparser ^3.0.0, xml >=3.7.0 requires petitparser ^3.0.0.
And because intl_utils 1.5.0 depends on petitparser >=1.1.3 <3.0.0 and flutter_svg >=0.18.0 depends on xml ^4.1.0, intl_utils 1.5.0 is incompatible with flutter_svg >=0.18.0.
So, because "App" depends on both flutter_svg ^0.18.0 and intl_utils 1.5.0, version solving failed.
pub get failed (1; So, because "App" depends on both flutter_svg ^0.18.0 and intl_utils 1.5.0, version solving failed.)
exit code 1
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: 0.1.2
google_maps_flutter: 0.5.27
google_map_location_picker: 3.2.2
mvc_pattern: 5.1.0
global_configuration: 1.5.0
http: 0.12.1
intl: 0.16.0
html: 0.14.0+3
shared_preferences: 0.5.7
flutter_html: 0.11.1
flutter_svg: ^0.18.0
location: 3.0.2
dynamic_theme: 1.0.1
flutter_inappbrowser: 2.0.2
url_launcher: 5.4.5
firebase_messaging: 6.0.13
cached_network_image: 2.2.0
fluttertoast: 4.0.1
flutter_staggered_grid_view: 0.3.0
carousel_slider: 1.3.0
sticky_headers: ^0.1.8
intl_utils: ^1.6.3
photo_view: ^0.9.2

I solved it by adding intl_utils: ^1.6.3 to dependencies and changing the intl: 0.16.1 in dependencies

I solved using
Blockquote
by pothuraju sai chaitanya
I solved it by adding intl_utils: ^1.6.3 to dependencies and changing the intl: 0.16.1 in dependencies
and in the end
dependency_overrides: intl: 0.17.0-nullsafety.2

Related

'Could not find a version that satisfies the requirement matplotlib==3.4.3' problem on Python 3.10

I need help with pip install -r matplotlib==3.4.3 on Python 3.10.
Here's my CMD output:
Collecting matplotlib==3.4.3
Downloading matplotlib-3.4.3.tar.gz (37.9 MB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: `'C:\Users\eob_o\venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'`
C:\\Users\\eob_o\\AppData\\Local\\Temp\\pip-install-txwy9aql\\matplotlib_201a53d35123474cbeaa8a08acd5c0c5\\setup.py'"'"'
ERROR: Command errored out with exit status 1:
command: `'C:\Users\eob_o\venv\Scripts\python.exe' 'C:\Users\eob_o\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py'` build_wheel
'C:\Users\eob_o\AppData\Local\Temp\tmpqjub6dxu'
Complete output (200 lines):
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.
warnings.warn(#Running from numpy source directory.
C:\Users\eob_o\AppData\Local\Temp\pip-wheel_qobiqz_\numpy_24f149b83cd943538729a21c1b35fa75\tools\cythonize.py:69:
DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.version import LooseVersion
Processing numpy/random\_bounded_integers.pxd.in
Processing numpy/random\bit_generator.pyx
Processing numpy/random\mtrand.pyx
Processing numpy/random\_bounded_integers.pyx.in
Processing numpy/random\_common.pyx
Processing numpy/random\_generator.pyx
Processing numpy/random\_mt19937.pyx
Processing numpy/random\_pcg64.pyx
Processing numpy/random\_philox.pyx
Processing numpy/random\_sfc64.pyx
...
BUILDING MATPLOTLIB
matplotlib: yes [3.4.3]
python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)]]
platform: yes [win32]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
----------------------------------------
WARNING: Discarding
https://files.pythonhosted.org/packages/21/37/197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.gz#sha256=fc4f526dfdb31c9bd6b8ca06bf9fab663ca12f3ec9cdf4496fb44bc680140318 (from https://pypi.org/simple/matplotlib/) (requires-python:>=3.7).
Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement matplotlib==3.4.3 (from versions: 0.86, 0.86.1, 0.86.2, 0.91.0, 0.91.1, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1rc1, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2, 2.2.0rc1, 2.2.0, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 3.0.0rc2, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0rc1, 3.1.0rc2, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0rc1, 3.2.0rc3, 3.2.0, 3.2.1, 3.2.2, 3.3.0rc1, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.4.0rc1, 3.4.0rc2, 3.4.0rc3, 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.5.0b1, 3.5.0rc1)
ERROR: No matching distribution found for matplotlib==3.4.3
By following the clue setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10., I decided to uninstall Python 3.10 and replace with Python 3.9. And my problem got solved!

Howto modify/affect/adapt conan dependencies

I am not a conan expert, so maybe there is an obvious solution for this. But it can't be trivial since I am struggling with this for a while and can't find a solution.
We need parquet for our project, we include this via the conan arrow package like this, conanfile.txt:
[requires]
arrow/2.0.0
[generators]
cmake
[options]
spdlog:=gcc
arrow:shared=False
arrow:parquet=True
arrow:fPIC=False
arrow:with_re2=False
arrow:with_protobuf=False
arrow:with_openssl=False
arrow:with_gflags=False
arrow:with_glog=False
arrow:with_grpc=False
arrow:with_utf8proc=False
arrow:with_zstd=False
arrow:with_bz2=False
(I remove all the other packages, but there are not so many of them)
The problem is on our CI we get the error:
...
Downloading conanmanifest.txt
Downloading conanfile.py
Downloading conan_export.tgz
thrift/0.13.0: Downloaded recipe revision 0
openssl/1.1.1j: Not found in local cache, looking in remotes...
openssl/1.1.1j: Trying with 'conan-center'...
Downloading conanmanifest.txt
Downloading conanfile.py
Downloading conan_export.tgz
openssl/1.1.1j: Downloaded recipe revision 0
ERROR: openssl/1.1.1j: Cannot load recipe.
Error loading conanfile at '/conan/.conan/data/openssl/1.1.1j/_/_/export/conanfile.py': Current Conan version (1.32.1) does not satisfy the defined one (>=1.33.0).
CMake Error at cmake/conan.cmake:368 (message):
Conan install failed='1'
Call Stack (most recent call first):
cmake/conan.cmake:448 (conan_cmake_install)
CMakeLists.txt:137 (conan_cmake_run)
-- Configuring incomplete, errors occurred!
See also "/builds/0/corsika/build/CMakeFiles/CMakeOutput.log".
indicating correctly that on CI we use containers with conan 1.32.1 and this seems to be in conflict with openssl/1.1.1j that wants >= 1.33.0.
I find that annoying because we explicitly don't want and don't need openssl and we switch it off for arrow (see above).
When I run conan info . I can see that:
conanfile.txt
ID: 33d8c2433f5e03548c5229121dbd4f82e354000d
BuildID: None
Requires:
arrow/2.0.0
arrow/2.0.0
ID: cd50fd05198137f0420bf6da1e5029dade26bc93
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://arrow.apache.org/
License: Apache-2.0
Description: Apache Arrow is a cross-language development platform for in-memory data
Topics: conan, arrow, memory
Provides: arrow
Recipe: Cache
Binary: Missing
Binary remote: conan-center
Creation date: 2020-11-22 17:53:36 UTC
Required by:
conanfile.txt
Requires:
thrift/0.13.0
boost/1.75.0
ID: d9d3e501899335bccbe5205508f9a4801424ce7d
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://www.boost.org
License: BSL-1.0
Description: Boost provides free peer-reviewed portable C++ source libraries
Topics: conan, boost, libraries, cpp
Provides: boost
Recipe: Cache
Binary: Download
Binary remote: conan-center
Creation date: 2021-04-13 19:51:36 UTC
Required by:
thrift/0.13.0
Requires:
zlib/1.2.11
bzip2/1.0.8
libiconv/1.16
bzip2/1.0.8
ID: da606cf731e334010b0bf6e85a2a6f891b9f36b0
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: http://www.bzip.org
License: bzip2-1.0.8
Description: bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm.
Topics: conan, bzip2, data-compressor, file-compression
Provides: bzip2
Recipe: Cache
Binary: Cache
Binary remote: conan-center
Creation date: 2020-09-04 10:44:14 UTC
Required by:
boost/1.75.0
libevent/2.1.12
ID: 6b0981c427aa0eb8bea05add2094df29ed639799
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://github.com/libevent/libevent
License: BSD-3-Clause
Description: libevent - an event notification library
Topics: conan, libevent, event
Provides: libevent
Recipe: Cache
Binary: Cache
Binary remote: conan-center
Creation date: 2021-03-18 17:32:39 UTC
Required by:
thrift/0.13.0
Requires:
openssl/1.1.1j
libiconv/1.16
ID: 6af9cc7cb931c5ad942174fd7838eb655717c709
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://www.gnu.org/software/libiconv/
License: LGPL-2.1
Description: Convert text to and from Unicode
Topics: libiconv, iconv, text, encoding, locale, unicode, conversion
Provides: libiconv
Recipe: Cache
Binary: Cache
Binary remote: conan-center
Creation date: 2020-10-04 02:46:44 UTC
Required by:
boost/1.75.0
openssl/1.1.1j
ID: 6af9cc7cb931c5ad942174fd7838eb655717c709
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://github.com/openssl/openssl
License: OpenSSL
Description: A toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols
Topics: conan, openssl, ssl, tls, encryption, security
Provides: openssl
Recipe: Cache
Binary: Cache
Binary remote: conan-center
Creation date: 2021-03-26 21:05:40 UTC
Required by:
thrift/0.13.0
libevent/2.1.12
thrift/0.13.0
ID: 44b3a17b9712eb98c7cab65c26ec70335992ff20
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://github.com/apache/thrift
License: Apache-2.0
Description: Thrift is an associated code generation mechanism for RPC
Topics: conan, thrift, serialization, rpc
Provides: thrift
Recipe: Cache
Binary: Download
Binary remote: conan-center
Creation date: 2021-03-30 05:58:58 UTC
Required by:
arrow/2.0.0
Requires:
boost/1.75.0
openssl/1.1.1j
zlib/1.2.11
libevent/2.1.12
zlib/1.2.11
ID: 6af9cc7cb931c5ad942174fd7838eb655717c709
BuildID: None
Remote: conan-center=https://conan.bintray.com
URL: https://github.com/conan-io/conan-center-index
Homepage: https://zlib.net
License: Zlib
Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)
Topics: conan, zlib, compression
Provides: zlib
Recipe: Cache
Binary: Cache
Binary remote: conan-center
Creation date: 2020-11-15 04:53:34 UTC
Required by:
thrift/0.13.0
boost/1.75.0
and it seem the reason openssl is pulled in is because of thrift and libevent.
So what are solution here given the fact that we cannot change our CI containers because then we basically drop support to platforms that we need to support?
why openssl depends on conan version in the first place? Can't this we fixed or worked around?
can we affect the dependency tree of arrow in a way to avoid any reference to openssl? E.g. provide dedicated versions of thrift/libevent that come without openssl (if this is even possible)?
Are there any other options?
(As a footnote, the containers and systems we use are all not terribly outdated so I believe this problem can easily affect many users. I have not found any solution after search for a while. )
The obvious recommendation: Update Conan to the latest version (1.35.1).
pip install -U conan
Packages in Conan Center Index (all official) are not blocked by any old version, actually it's mandatory testing them with latest Conan version available. Conan Center Index assumes you are running latest Conan client version too:
https://github.com/conan-io/conan-center-index/blob/41d4fbb8c218f9d938ccb8b9d888bff52002e62e/.github/PULL_REQUEST_TEMPLATE.md#L9
https://github.com/conan-io/conan-center-index/blob/c060f7086f3745361795fb6379bd6f0bac000bab/docs/how_to_add_packages.md#L57
why openssl depends on conan version in the first place? Can't this we fixed or worked around?
New Conan features are introduces for every new release. You can't simply change a recipe because you are consuming them. Even if you download the recipe and remove that check, it will fail, because your Conan client version doesn't support some method/feature in that recipe.
can we affect the dependency tree of arrow in a way to avoid any reference to openssl? E.g. provide dedicated versions of thrift/libevent that come without openssl (if this is even possible)?
Yes, but is not recommended. You can declare other package versions consumed by arrow in your conanfile.txt, it will force Conan to use your versions.
Are there any other options?
Yes, don't try workarounds, do the right thing, update your client version.

Executable links correctly but fails to load a library

I have Boost and Served REST API package installed in /opt/local.
Here's the "meaningful" part of my CmakeLists.txt:
find_package(PkgConfig REQUIRED)
pkg_check_modules(SERVED_PKG REQUIRED IMPORTED_TARGET served)
add_executable( rest_server rest_server.cpp )
target_link_libraries(rest_server PUBLIC PkgConfig::SERVED_PKG)
It does create an executable, and links it with the needed library.
However, it somehow fails to include the path to that library:
$ otool -L cmake-build-debug/rest_server
cmake-build-debug/rest_server:
libserved.1.4.dylib (compatibility version 0.0.0, current version 1.4.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 902.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
Which, when I try to run it via the CLion IDE, results in a failure to load the libserved.1.4.dylib library:
/Users/ur20980/src/security2/cmake-build-debug/rest_server
dyld: Library not loaded: libserved.1.4.dylib
Referenced from: /Users/ur20980/src/security2/cmake-build-debug/rest_server
Reason: image not found
Process finished with exit code 6
When I invoke the executable manually from the terminal, it seems to be OK:
$ cmake-build-debug/rest_server
Hello, World!
What is wrong???

Unable to import matplotlib._png (pylab)

I am unable to import matplotlib._png:
import matplotlib._png as _png ImportError:
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/_png.so:
undefined symbol: png_set_longjmp_fn
This error prevents me from running import pylab (sincce this ultimately imports matplotlib._png).
I installed matplotlib from source, and made sure to add the path with local installations (/home/james/local) to basedir in setupext.py before running python setup.py install.
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.7.1]
dateutil: yes [using dateutil version 2.1]
tornado: yes [using tornado version 3.0.1]
pyparsing: yes [using pyparsing version 1.5.7]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found Using local copy.]
freetype: yes [version 16.0.10]
png: yes [version 1.2.10]
My research so far:
As can be seen above, matplotlib seems to find version 1.2.10 even though the version that I have under /home/james/local is 1.6.2:
$ find . -iname '*libpng*'
./libpng16.so.16.1.0
./libpng16.so
./libpng16.so.16
./libpng16.a
./libpng.a
./libpng.so
./libpng16.la
./pkgconfig/libpng.pc
./pkgconfig/libpng16.pc
./libpng.la
More specifically, I modified the following line in setupext.py with:
return basedir_map.get(sys.platform, ['/home/james/local', '/usr/local', '/usr'])
but matplotlib seems to have found the system version:
$ locate libpng
/usr/lib/libpng.so
/usr/lib/libpng.so.3
/usr/lib/libpng.so.3.10.0
/usr/lib/libpng12.a
/usr/lib/libpng12.so
/usr/lib/libpng12.so.0
/usr/lib/libpng12.so.0.10.0
Could this be the problem? Why am I unable to import matplotlib._png?
Update:
Looking at setupext.py, it looks like python setup install queries pkg-config through the SetupPackage method _check_for_pkg_config to determine the version of libpng I have installed. It turns out that pkg-config is returning the system installation:
$ pkg-config --libs libpng
-lpng12
even though I have updated basedir in matplotlib's setupext.py, and LD_LIBRARY_PATH to make them point to the the more recent version of libpng that I have locally installed.
Any ideas on how to have pkg-config return the right version?
It's a pkg-config issue; matplotlib's installation is (unfortunately, or perhaps not) relying too much on pkg-config's output.
Assuming you have build libpng the normal way, there should be a pkgconfig subdirectory in your /home/james/local/lib, which contains libpng.pc (and libpng16.pc). When setupext.py runs pkg-config, the latter should of course try and pick up the correct .pc file for libpng. For that, use the PKG_CONFIG_PATH variable and point it to the pkgconfig subdirectory:
$ export PKG_CONFIG_PATH=/home/james/local/lib/pkgconfig
Then, install matplotlib again, and see that it now finds the correct libpng version:
$ python setup.py build
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.1.0
python: 2.7.4 (default, Apr 8 2013, 16:36:47) [GCC 4.4.5]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.7.0
freetype2: 12.0.6
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.6.1
Tkinter: Tkinter: 81008, Tk: 8.4, Tcl: 8.4
(For me, with a different PKG_CONFIG_PATH of course. Yes, I may want to upgrade some dependencies.)
Note that I didn't even alter basedirlist; it's just at its default.
In case pkg-config fails to now pick up some other package, just add more directories to PKG_CONFIG_PATH with colons in between. But I guess this should be enough.
Try
export LD_LIBRARY_PATH=/home/james/local/lib
and then execute Matplotlib... that would point matplotlib to your local version.

Valgrind 2.20 to be used but requires glibc 2.1 - 2.3 version

I want to install valgrind 2.20. It requires glibc 2.1-2.3 version. I am having glibc2.11? What can i change in configure file to solve the problem? I tried this link valgrind doesn't accept newest version of glibc
And pasted this
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.11 family" >&5
$as_echo "2.11 family" >&6; }
$as_echo "#define GLIBC_2_11 1" >>confdefs.h
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
;;
but it is showing the same error
configure: error: Valgrind requires the glibc version 2.1, 2.2 or 2.3
What can i change in configure file to solve the problem?
It's a bug in autoconf, which has long since been fixed.
Just edit configure script to remove the glibc version check.