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

Invalid version error during installation #185

Closed
narendrachaudhary51 opened this issue Apr 27, 2021 · 5 comments · Fixed by #196
Closed

Invalid version error during installation #185

narendrachaudhary51 opened this issue Apr 27, 2021 · 5 comments · Fixed by #196
Assignees

Comments

@narendrachaudhary51
Copy link

narendrachaudhary51 commented Apr 27, 2021

Following discussion from #70.
I do the following steps to install katana. I get invalid version errors at the corresponding steps.

  1. git clone https://github.com/KatanaGraph/katana.git

  2. SRC_DIR=/home/katana

  3. conda env create --name katana-dev --file $SRC_DIR/conda_recipe/environment.yml

  4. conda activate katana-dev

  5. conda install -c conda-forge numactl-devel-cos6-x86_64

  6. BUILD_DIR=/home/katana/build

  7. mkdir -p $BUILD_DIR

  8. cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release -DKATANA_LANG_BINDINGS=python -DBUILD_SHARED_LIBS=ON

  9. conda build -c conda-forge $SRC_DIR/conda_recipe/
    ERROR - anaconda3/lib/python3.8/site-packages/conda/models/version.py", line 164, in init
    raise InvalidVersionSpec(vstr, "empty version string")
    conda.exceptions.InvalidVersionSpec: Invalid version '': empty version string

  10. cd $BUILD_DIR

  11. make -j 8
    ERROR - /home/katana/build/katana_python_build/scripts/katana_version/version.py", line 177, in get_explicit_version
    explicit_version = tag_version or get_config_version(
    File "/home/katana/build/katana_python_build/scripts/katana_version/version.py", line 197, in get_config_version
    with open(Path(file).parent.parent.parent / CONFIG_VERSION_PATH, "rt") as version_file:

  12. make clean

  13. rm CMakeCache.txt

  14. cd $SRC_DIR

  15. cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release

  16. cd $BUILD_DIR

  17. make -j 8
    Done

@arthurp
Copy link
Contributor

arthurp commented Apr 27, 2021

Thank you. There are several different issues here. Let me split this up to hopefully clarify it.

You installed things correctly, Great!

$ git clone https://github.com/KatanaGraph/katana.git
$ SRC_DIR=/home/katana
$ conda env create --name katana-dev --file $SRC_DIR/conda_recipe/environment.yml
$ conda activate katana-dev
$ conda install -c conda-forge numactl-devel-cos6-x86_64

You are mixing different builds here. conda build is totally self contained. If you want to build conda packages you just call conda build and that's it. Also you don't need to build the conda package, though. You can just do a normal build.

$ BUILD_DIR=/home/katana/build
$ mkdir -p $BUILD_DIR
$ cmake -S $SRC_DIR -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release -DKATANA_LANG_BINDINGS=python -DBUILD_SHARED_LIBS=ON
$ conda build -c conda-forge $SRC_DIR/conda_recipe/
ERROR - anaconda3/lib/python3.8/site-packages/conda/models/version.py", line 164, in init
raise InvalidVersionSpec(vstr, "empty version string")
conda.exceptions.InvalidVersionSpec: Invalid version '': empty version string

This is an odd error. I wouldn't expect it. I'll look into this.

$ cd $BUILD_DIR
$ make -j 8
ERROR - /home/katana/build/katana_python_build/scripts/katana_version/version.py", line 177, in get_explicit_version
explicit_version = tag_version or get_config_version(
File "/home/katana/build/katana_python_build/scripts/katana_version/version.py", line 197, in get_config_version
with open(Path(file).parent.parent.parent / CONFIG_VERSION_PATH, "rt") as version_file:

The fact that you also get this error here is strange. I have some kind of idea, though. Hmm. Can you send me the complete error message? You seem to have truncated the error message.

@arthurp arthurp self-assigned this Apr 27, 2021
@narendrachaudhary51
Copy link
Author

narendrachaudhary51 commented Apr 27, 2021

This is the full error message

Checking for Python package 'packaging'...Found 20.9.
Traceback (most recent call last):
  File "/home/katana/build/katana_python_build/setup.py", line 18, in <module>
    package_setup()
  File "/home/katana/build/katana_python_build/setup.py", line 14, in package_setup
    katana_setup.setup(source_dir="python", package_name="katana", doc_package_name="Katana Python")
  File "/home/katana/build/katana_python_build/python/katana_setup.py", line 378, in setup
    version=get_katana_version(),
  File "/home/katana/build/katana_python_build/python/katana_setup.py", line 416, in get_katana_version
    return str(katana_version.version.get_version())
  File "/home/katana/build/katana_python_build/scripts/katana_version/version.py", line 67, in get_version
    k_explicit_version, variant = get_explicit_version(
  File "/home/katana/build/katana_python_build/scripts/katana_version/version.py", line 177, in get_explicit_version
    explicit_version = tag_version or get_config_version(
  File "/home/katana/build/katana_python_build/scripts/katana_version/version.py", line 197, in get_config_version
    with open(Path(__file__).parent.parent.parent / CONFIG_VERSION_PATH, "rt") as version_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/katana/build/katana_python_build/config/version.txt'
make[2]: *** [CMakeFiles/katana_python.dir/build.make:71: CMakeFiles/katana_python] Error 1
make[1]: *** [CMakeFiles/Makefile2:1541: CMakeFiles/katana_python.dir/all] Error 2

@arthurp
Copy link
Contributor

arthurp commented Apr 27, 2021

What platform are you on? Distribution. Architecture. Version of cmake.

(Detail: It appears that an environment variable is getting lost between cmake and setuptools call. Or that cmake is failing to set the environment variable.)

@narendrachaudhary51
Copy link
Author

I am on CentOS 7, x86 architecture. cmake version 3.19.5

@arthurp
Copy link
Contributor

arthurp commented Apr 27, 2021

Thanks. I will look at this when I have time. It may take a week or two to get this specific issue fixed. Hopefully, I can still help you get things built so you can use it.

arthurp added a commit to arthurp/katana that referenced this issue Apr 29, 2021
The script was using a fixed path to the version_file in one case
instead of using the detected one.

Fixes: KatanaGraph#185
arthurp added a commit to arthurp/katana that referenced this issue Apr 30, 2021
The script was using a fixed path to the version_file in one case
instead of using the detected one.

Fixes: KatanaGraph#185
arthurp added a commit that referenced this issue Apr 30, 2021
The script was using a fixed path to the version_file in one case
instead of using the detected one.

Fixes: #185
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

Successfully merging a pull request may close this issue.

2 participants