Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

swmm-toolkit can not install in linux amd64,only have linux_x86_64 #111

Closed
Lijifeng1234 opened this issue May 5, 2023 · 15 comments
Closed

Comments

@Lijifeng1234
Copy link

Lijifeng1234 commented May 5, 2023

No description provided.

@bemcdonnell bemcdonnell transferred this issue from pyswmm/pyswmm May 5, 2023
@bemcdonnell
Copy link
Member

@Lijifeng1234 you’re going to have to build it.

@Lijifeng1234
Copy link
Author

@Lijifeng1234 you’re going to have to build it.
Thank you for your reply !
I have to build it in linux amd64 now,what should I do ?

@bemcdonnell
Copy link
Member

@Lijifeng1234, I created a simple guide in this issue (which coincidentally is very similar to your request today). Give this process a try with amd64 ..

#112 (comment)

@Lijifeng1234
Copy link
Author

@Lijifeng1234, I created a simple guide in this issue (which coincidentally is very similar to your request today). Give this process a try with amd64 ..

#112 (comment)

Thanks,I'll try it now.

@Lijifeng1234
Copy link
Author

Sorry, the official documentation is as follows

swmm_toolkit-0.14.0-cp311-cp311-win_amd64.whl (383.7 kB view hashes)
Uploaded Mar 29, 2023 cp311

swmm_toolkit-0.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (487.3 kB view hashes)
Uploaded Mar 29, 2023 cp311

swmm_toolkit-0.14.0-cp311-cp311-macosx_10_9_x86_64.whl (608.2 kB view hashes)

just have win_amd64\macosx_x86_64\manylinux_2_17_x86_64, linux_amd64 or linux_aarch64 not exits in range.

Can you provide the installation files for the above linux version or thr source code compiled files in Linux?

@bemcdonnell
Copy link
Member

@Lijifeng1234, I am not sure what you were asking for. Cmake is our build generator. All of the build files relevant to the code are all in the repository. Are you asking for the SWMM source code? If so, that is part of a sub module, that you would have to check out with the instructions that I gave in the document

@Lijifeng1234
Copy link
Author

@Lijifeng1234, I am not sure what you were asking for. Cmake is our build generator. All of the build files relevant to the code are all in the repository. Are you asking for the SWMM source code? If so, that is part of a sub module, that you would have to check out with the instructions that I gave in the document

Sorry,I got the system architecture wrong initially. I want to install pyswmm and swmm-toolkit in python 3.9 by arrch64_linux server,but pypi.org.com can not provide swmm-toolkit package with arrch64_linux.Meanwhile,installing swmm-toolkit by compiling source code always failed.I can't find the source code for pyswmm completion that compiles successfully in linux_aarch64.Could you help me?

@bemcdonnell
Copy link
Member

@Lijifeng1234, can you describe what failed when you were trying to build the SWMM-toolkit wheel? I outlined the whole process in the PDF. “Pyswmm” is all python code, this repository is the interfacing maps to the pyswmm/stormwater-management-model repository (where the code for SWMM is). If you follow the document line for line, can you tell me what errors you have?

build_swmm-toolkit_wheel_v1_20230505.pdf

@Lijifeng1234
Copy link
Author

@Lijifeng1234, can you describe what failed when you were trying to build the SWMM-toolkit wheel? I outlined the whole process in the PDF. “Pyswmm” is all python code, this repository is the interfacing maps to the pyswmm/stormwater-management-model repository (where the code for SWMM is). If you follow the document line for line, can you tell me what errors you have?

build_swmm-toolkit_wheel_v1_20230505.pdf

python3 setup.py bdist_wheel

CMake Error at swmm-solver/CMakeLists.txt:121 (install):
install EXPORT given no DESTINATION!

CMake Error at swmm-solver/CMakeLists.txt:130 (install):
install FILES given no DESTINATION!

install(
EXPORT
swmm5Targets
DESTINATION
"${CONFIG_DIST}"
FILE
swmm5-config.cmake
)

install(
FILES
${SWMM_PUBLIC_HEADERS}
DESTINATION
"${INCLUDE_DIST}"
)

@bemcdonnell
Copy link
Member

@Lijifeng1234 from which directory are you trying to run that command? Is it in your SWMM-toolkit ?

@Lijifeng1234
Copy link
Author

@Lijifeng1234 from which directory are you trying to run that command? Is it in your SWMM-toolkit ?

Yes,I got file from "https://github.com/pyswmm/swmm-python",and add "extern","swmm-solver" from "https://github.com/pyswmm/Stormwater-Management-Model" ["/extern","/src/solver"]

[root@localhost swmm-toolkit]# ls
AUTHORS CMakeLists.txt docs LICENSE.md setup.py src test-requirements.txt tools
build-requirements.txt dist extern README.md _skbuild swmm-solver tests
[root@localhost swmm-toolkit]#
[root@localhost swmm-toolkit]# ls extern/
boost.cmake openmp.cmake version.cmake version.h.in

[root@localhost swmm-toolkit]# ls swmm-solver/
bindings datetime.h exfil.c gage.c iface.c input.c lid.h mempool.c project.c routing.c street.h toposort.c
climate.c dwflow.c exfil.h globals.h include inputrpt.c lidproc.c mempool.h qualrout.c runoff.c subcatch.c transect.c
CMakeLists.txt dynwave.c findroot.c gwater.c infil.c keywords.c link.c node.c rain.c shape.c surfqual.c treatmnt.c
consts.h enums.h findroot.h hash.c infil.h keywords.h macros.h objects.h rdii.c snow.c swmm5.c version.h
controls.c error.c flowrout.c hash.h inflow.c kinwave.c massbal.c odesolve.c report.c stats.c table.c xsect.c
culvert.c error.h forcmain.c headers.h inlet.c landuse.c mathexpr.c odesolve.h Roadmap.txt statsrpt.c text.h xsect.dat
datetime.c error.txt funcs.h hotstart.c inlet.h lid.c mathexpr.h output.c roadway.c street.c toolkit.c
[root@localhost swmm-toolkit]#

[root@localhost swmm-toolkit]# mkdir -p ./dist
[root@localhost swmm-toolkit]# python3 -m pip install -r build-requirements.txt
Requirement already satisfied: setuptools==65.5.1 in /usr/local/lib/python3.9/site-packages (from -r build-requirements.txt (line 4)) (65.5.1)
Requirement already satisfied: wheel==0.38.1 in /usr/local/lib/python3.9/site-packages (from -r build-requirements.txt (line 5)) (0.38.1)
Requirement already satisfied: scikit-build==0.11.1 in /usr/local/lib/python3.9/site-packages (from -r build-requirements.txt (line 6)) (0.11.1)
Requirement already satisfied: cmake==3.21 in /usr/local/lib/python3.9/site-packages (from -r build-requirements.txt (line 7)) (3.21.0)
Requirement already satisfied: swig==4.0.2 in /usr/local/lib/python3.9/site-packages (from -r build-requirements.txt (line 8)) (4.0.2)
Requirement already satisfied: packaging in /usr/local/lib/python3.9/site-packages (from scikit-build==0.11.1->-r build-requirements.txt (line 6)) (23.1)
Requirement already satisfied: distro in /usr/local/lib/python3.9/site-packages (from scikit-build==0.11.1->-r build-requirements.txt (line 6)) (1.8.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[root@localhost swmm-toolkit]# python3 setup.py bdist_wheel
/usr/local/lib/python3.9/site-packages/setuptools/_distutils/dist.py:264: UserWarning: Unknown distribution option: 'cmake_process_manifest_hook'
warnings.warn(msg)


-- Trying "Unix Makefiles" generator






--
Not searching for unused variables given on the command line.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 7.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit/_cmake_test_compile/build







-- Trying "Unix Makefiles" generator - success

Configuring Project
Working directory:
/usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit/_skbuild/linux-aarch64-3.9/cmake-build
Command:
cmake /usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit/_skbuild/linux-aarch64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3 -DPYTHON_VERSION_STRING:STRING=3.9.4 -DPYTHON_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/usr/local/lib/libpython3.9.a -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.9/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release

-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_C: -fopenmp (found version "4.5")
fatal: Not a git repository (or any parent directory):.git
CMake Error at swmm-solver/CMakeLists.txt:121 (install):
install EXPORT given no DESTINATION!

CMake Error at swmm-solver/CMakeLists.txt:130 (install):
install FILES given no DESTINATION!

-- Configuring incomplete, errors occurred!
See also "/usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit/_skbuild/linux-aarch64-3.9/cmake-build/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 582, in setup
env = cmkr.configure(cmake_args,
File "/usr/local/lib/python3.9/site-packages/skbuild/cmaker.py", line 229, in configure
raise SKBuildError(

An error occurred while configuring with CMake.
Command:
cmake /usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit/_skbuild/linux-aarch64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/local/bin/python3 -DPYTHON_VERSION_STRING:STRING=3.9.4 -DPYTHON_INCLUDE_DIR:PATH=/usr/local/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/usr/local/lib/libpython3.9.a -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.9/site-packages/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release
Source directory:
/usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit
Working directory:
/usr/local/lib/python3.9/site-packages/swmm-python-0.14.0/swmm-python-0.14.0/swmm-toolkit/_skbuild/linux-aarch64-3.9/cmake-build
Please see CMake's output for more information.
[root@localhost swmm-toolkit]#

@bemcdonnell
Copy link
Member

@Lijifeng1234 I’ll preface my idea that I’ve been wrong many times before. This really seems like a directory problem. Can you send a screenshot of your directory and show where all the code and project contents are? SWMM-toolkit needs SWMM-solver in a very specific layout. I just want to confirm the sub modules are correct. Then I want to make sure the right versions are checked out of SWMM and SWMM-toolkit

@Lijifeng1234
Copy link
Author

@Lijifeng1234 I’ll preface my idea that I’ve been wrong many times before. This really seems like a directory problem. Can you send a screenshot of your directory and show where all the code and project contents are? SWMM-toolkit needs SWMM-solver in a very specific layout. I just want to confirm the sub modules are correct. Then I want to make sure the right versions are checked out of SWMM and SWMM-toolkit
There is too much content to show it all. But all the files and content are from the above two links, which you can download and view. When testing your version separately, find that swmm-solver is incomplete with extern, and then supplement it with Stormwater-Management-Model.
image

image

@bemcdonnell
Copy link
Member

@abhiramm7 any thoughts with this one?

@bemcdonnell
Copy link
Member

I’m converting this to a discussion since we have not opted to support amd64 at this time.

@pyswmm pyswmm locked and limited conversation to collaborators May 7, 2023
@bemcdonnell bemcdonnell converted this issue into discussion #114 May 7, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants