question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Symbol not found find_last_not_of

See original GitHub issue

I believe I’ve encountered the issue reported in #257.

Using Python 3.9.2 as installed from Python.org on MacOS 11.2.3, I’ve used brew install sdl2 sdl2_image gifsicle and then install pyxel 1.4.3 from wheel, then attempt to install the examples, but it fails with this error:

draft $ install_pyxel_examples
Traceback (most recent call last):
  File "/Users/jaraco/.local/bin/install_pyxel_examples", line 5, in <module>
    from pyxel.examples import install
  File "/Users/jaraco/.local/pipx/venvs/pyxel/lib/python3.9/site-packages/pyxel/__init__.py", line 10, in <module>
    from . import core  # type: ignore
  File "/Users/jaraco/.local/pipx/venvs/pyxel/lib/python3.9/site-packages/pyxel/core/__init__.py", line 42, in <module>
    _lib = _load_library()
  File "/Users/jaraco/.local/pipx/venvs/pyxel/lib/python3.9/site-packages/pyxel/core/__init__.py", line 39, in _load_library
    return cdll.LoadLibrary(lib_path)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/jaraco/.local/pipx/venvs/pyxel/lib/python3.9/site-packages/pyxel/core/bin/macos/libpyxelcore.dylib, 6): Symbol not found: __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcmm
  Referenced from: /Users/jaraco/.local/pipx/venvs/pyxel/lib/python3.9/site-packages/pyxel/core/bin/macos/libpyxelcore.dylib
  Expected in: /usr/lib/libstdc++.6.dylib
 in /Users/jaraco/.local/pipx/venvs/pyxel/lib/python3.9/site-packages/pyxel/core/bin/macos/libpyxelcore.dylib

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
ryohjicommented, Aug 8, 2021

To solve this problem fundumentally, it seems that we need to make libpyxelcore.dylib from source.

  1. Clone source from github. git clone https://github.com/kitao/pyxel.git
  2. Edit pyxel/pyxel/core/Makefile line 28, from CC = g++-10 to CC = g++ (or CC = c++ if you want to use Xcode CLT).
  3. Delete problematic dylib. rm pyxel/pyxel/core/bin/macos/libpyxelcore.dylib
  4. Make new dylib. make -C pyxel/pyxel/core
  5. Install package from local copy. python3 -m pip install --use-feature=in-tree-build ./pyxel

The error message “Symbol not found” saids that the symbol referenced by libpyxelcore.dylib is not found in our system libraries. The libpyxcelcore.dylib included in current pyxel 1.4.3 package was built using g+±10, but for newer macOS it replaced by g+±11 and its libc++.dylib do not have the symbol. So we need make fresh dylib according to our system.

2reactions
keigo0205commented, Apr 28, 2021

I have the same problem.

I solved this problem using the method below.

python -m pip uninstall pyxel
python -m pip install --no-binary :all: pyxel

thanks!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

std::basic_string<CharT,Traits,Allocator>::find_last_not_of
Finds the last character equal to none of the characters in the ... If the character is not present in the interval, npos...
Read more >
std::string::find_last_not_of - CPlusPlus.com
Searches the string for the last character that does not match any of the characters specified in its arguments. When pos is specified,...
Read more >
Converting C++ std::string's find_*_of() methods to Java
Java's String class provides indexOf() and lastIndexOf() , but these find an index of a character or a string, not any of a...
Read more >
How To find_first_not_of() Or find_last_not_of() In C++ Apps
If the character is not present method returns the npos of the string (std::string::npos). Simply we can find the first character equal to...
Read more >
C++ String find_last_not_of() function - Javatpoint
This function is used to search the string for the last character that does not match with any of the character specified in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found