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

pip install palanteer fails #40

Open
tejus26 opened this issue Nov 8, 2022 · 4 comments
Open

pip install palanteer fails #40

tejus26 opened this issue Nov 8, 2022 · 4 comments

Comments

@tejus26
Copy link

tejus26 commented Nov 8, 2022

Hello, I am trying to install palanteer package but im hitting the below issue. Any pointers would be greatly appreciated.

Installing collected packages: palanteer
  Running setup.py install for palanteer ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for palanteer did not run successfully.
  │ exit code: 1
  ╰─> [35 lines of output]
      running install
      /proj/xsjsswstaff/tejuss/miniconda3/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        setuptools.SetuptoolsDeprecationWarning,
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.7
      creating build/lib.linux-x86_64-3.7/palanteer
      copying palanteer/__main__.py -> build/lib.linux-x86_64-3.7/palanteer
      copying palanteer/__init__.py -> build/lib.linux-x86_64-3.7/palanteer
      running build_ext
      building 'palanteer._cextension' extension
      creating build/temp.linux-x86_64-3.7
      creating build/temp.linux-x86_64-3.7/palanteer
      creating build/temp.linux-x86_64-3.7/palanteer/_cextension
      /proj/xsjsswstaff/tejuss/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /proj/xsjsswstaff/tejuss/miniconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /proj/xsjsswstaff/tejuss/miniconda3/include -fPIC -I/proj/xsjsswstaff/tejuss/miniconda3/include/python3.7m -c palanteer/_cextension/pyPalanteerInstrumentation.cpp -o build/temp.linux-x86_64-3.7/palanteer/_cextension/pyPalanteerInstrumentation.o -I palanteer/_cextension
      cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
      In file included from palanteer/_cextension/pyPalanteerInstrumentation.cpp:46:0:
      palanteer/_cextension/palanteer.h: In member function 'void plPriv::CliManager::registerCli(plCliHandler_t, const char*, const char*, const char*, plPriv::hashStr_t, plPriv::hashStr_t, plPriv::hashStr_t)':
      palanteer/_cextension/palanteer.h:2440:55: error: expected ')' before 'PRId64'
                               int readQty = sscanf(s, "[[%" PRId64 "]]", &p.defaultValue);
                                                             ^~~~~~
      palanteer/_cextension/palanteer.h:2440:83: warning: spurious trailing '%' in format [-Wformat=]
                               int readQty = sscanf(s, "[[%" PRId64 "]]", &p.defaultValue);
                                                                                         ^
      palanteer/_cextension/palanteer.h:2440:83: warning: too many arguments for format [-Wformat-extra-args]
      palanteer/_cextension/palanteer.h: In member function 'const char* plPriv::CliManager::execute(const char*, plPriv::plRemoteStatus&)':
      palanteer/_cextension/palanteer.h:2537:42: error: expected ')' before 'PRId64'
                               if(sscanf(s, "%" PRId64, &_cio._paramValues[paramIdx])!=1 || !skipValue(s))
                                                ^~~~~~
      palanteer/_cextension/palanteer.h:2537:78: warning: spurious trailing '%' in format [-Wformat=]
                               if(sscanf(s, "%" PRId64, &_cio._paramValues[paramIdx])!=1 || !skipValue(s))
                                                                                    ^
      palanteer/_cextension/palanteer.h:2537:78: warning: too many arguments for format [-Wformat-extra-args]
      error: command '/proj/xsjsswstaff/tejuss/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> palanteer

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure. 

@tejus26
Copy link
Author

tejus26 commented Nov 8, 2022

I am trying to install this with python3.7 on a Ubuntu 20.04 machine.

@dfeneyrou
Copy link
Owner

I never tried to build the python packages with conda, what we can see in your log is that the C++ header cinttype does not contains the macros PRIx64, which are defined from C++11.
The hypothesis is then that the used compiler x86_64-conda_cos6-linux-gnu-cc uses a defaut C++ standard before 11.
The commit above is explicitely stating the C++ version to use.
If you used the source from github, can you give it a try?

@tejus26
Copy link
Author

tejus26 commented Nov 14, 2022

I still the same issue ? I tried to install it using this command:
python -m pip install 'palanteer @ git+https://github.com/dfeneyrou/palanteer#subdirectory=python'

I see std=c++11 being passed correctly though.

@dfeneyrou
Copy link
Owner

I had to revert the previous tentative because it was creating other issues (the flag was passed also to C compilation units...).
I do not understand your environment, the "PRI" macros should be present in the compiler inttypes.h header...

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