conda-forge / ifcopenshell-feedstock

A conda-smithy repository for ifcopenshell.
BSD 3-Clause "New" or "Revised" License
3 stars 6 forks source link

Rebuild for occt76 #20

Closed regro-cf-autotick-bot closed 2 years ago

regro-cf-autotick-bot commented 2 years ago

This PR has been triggered in an effort to update occt76.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase code>@<space/conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/1694372988, please use this URL for debugging.

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

looooo commented 2 years ago

@conda-forge-admin, please rerender

looooo commented 2 years ago

@aothms is ifcopenshell ready for occt7.6? which branch to use?

luzpaz commented 2 years ago

Ping @aothms (IfcOpenShell) @moult (BlenderBim-Addon) @wassimj (https://github.com/wassimj/Topologic)

We're trying to update OCC 7.6.1 in conda.

aothms commented 2 years ago

Thank you for this.

I just committed the last 7.6 compatibility fix to the v0.7.0 branch. https://github.com/IfcOpenShell/IfcOpenShell/commit/461b78665a726e91954cfea4e2658213b0da4161

  1. A quick heads up v0.7 has a bunch of additional dependencies:

hdf5, cgal (hence gmp [or equivalent mpir on windows], mpfr)

We can do an initial version without (would require some fixes on my side to make them optional). But they are really quite nice to have: hdf5 for caching, cgal (Arrangement_2) for drawing generation. I think the BIM workbench might want to use them over time.

  1. Only a handful of users has tested yet with 7.6.

  2. IfcOpenShell has a continuous development model basically. At some point we had some issues with v0.6.0 where we should have used some postfix to the version number. Like alpha 0 or whatever. Hope that can be arranged. If I need to tag something on the side of the IfOpSh repo, please let me know.

looooo commented 2 years ago

@aothms cgal hdf5 and mpfr are available from conda-forge: https://anaconda.org/conda-forge/cgal https://anaconda.org/conda-forge/hdf5 https://anaconda.org/conda-forge/mpfr

so I will try to switch to v0.7.0

If it is possible a alpha version would make a lot of sense to me.

luzpaz commented 2 years ago

bump

aothms commented 2 years ago

Were you waiting for my tag? Just pushed v0.7.0-alpha0 https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0-alpha0

wassimj commented 2 years ago

hi everyone. I just did a pre-release of topologic for occt 7.6.0. It seems to work fine, but is not tested. https://github.com/wassimj/TopologicSverchok/releases/tag/v0.8.1.0-alpha

looooo commented 2 years ago

@aothms can you rename the version? I get this error: Error: bad character '-' in package/version: v0.7.0-alpha0

I can also adresse this somehow in the feedstock, but I guess it's not the best option to keep the - in the version-name.

aothms commented 2 years ago

Ok, actually the convention we had was a postfixed with a number instead of -alpha anyway. So can you try again with v0.7.0a0 https://github.com/IfcOpenShell/IfcOpenShell/releases/tag/v0.7.0a0 Thanks

looooo commented 2 years ago

ok, now I am getting this one:

CMake Error at CMakeLists.txt:843 (ADD_SUBDIRECTORY):
  The source directory

    /home/conda/feedstock_root/build_artifacts/ifcopenshell_1649601640487/work/src/svgfill

  does not contain a CMakeLists.txt file.

is this a subrepo?

aothms commented 2 years ago

is this a subrepo?

yes

There is also a recipe under development btw within the ifcopenshell repo, maybe for inspiration: https://github.com/IfcOpenShell/IfcOpenShell/pull/2132

Might be that we'll be running into similar issues because the expectations in the 0.7 cmake file are a bit specific

looooo commented 2 years ago

@aothms is it possible to include the subrepos in the release?

aothms commented 2 years ago

@looooo I think this requires using git_url instead of url the github tar archives never include submodules.

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

adrianinsaval commented 2 years ago

@looooo looking at the log it seems gmp is missing from the dependencies, no idea if that would be enough to get this to run though

looooo commented 2 years ago

@adrianinsaval gmp is in the dependencies, seems like make can't find it. Any ideas @aothms

aothms commented 2 years ago

First of all, gmp is not available on win. Use mpir there (but luckily it provides a compatibility gmp.h so nothing else is needed in terms of different config).

gmp, mpfr have includes directly in $PREFIX/Library/include

cgal probably as well. What's the difference between cgal and cgal-cpp on conda forge?

So my guess would be to start with the following:

-DCGAL_INCLUDE_DIR=$PREFIX/Library/include
-DGMP_INCLUDE_DIR=$PREFIX/Library/include
-DMPFR_INCLUDE_DIR=$PREFIX/Library/include
-DCGAL_LIBRARY_DIR=$PREFIX/Library/lib
-DGMP_LIBRARY_DIR=$PREFIX/Library/lib
-DMPFR_LIBRARY_DIR=$PREFIX/Library/lib
looooo commented 2 years ago

@aothms still failing with:

-- Looking for CGAL include files in: $PREFIX/include/CGAL
-- Looking for CGAL library files in: $PREFIX/lib
CMake Error at /home/conda/feedstock_root/build_artifacts/ifcopenshell_1655749171381/work/src/svgfill/CMakeLists.txt:39 (message):
  Unable to find CGAL library files, aborting
aothms commented 2 years ago

Ok, I would be inclined to switch to cgal-cpp as the dependency and then remove -DCGAL_LIBRARY_DIR=$PREFIX/lib. That way cgal is configured header-only it seems which is actually the default now after v5.0.

looooo commented 2 years ago

hmm osx is failing with:

fatal: iconv_open(UTF-8,UTF-8-MAC) failed, but needed:
    precomposed unicode is not supported.
    If you want to use decomposed unicode, run
    "git config core.precomposeunicode false"

would be nice to have a tar.gz for the source where all the subrepos are included.

aothms commented 2 years ago

What a mess https://github.com/conda-forge/git-feedstock/issues/50

I can probably fix this by renaming some files in the submodule. Do you want me to go ahead with that and create a new tag?

aothms commented 2 years ago

@looooo ping ^

looooo commented 2 years ago

any news on this @aothms

aothms commented 2 years ago

(1) The Linux build fails on:

ImportError: /home/conda/feedstock_root/build_artifacts/ifcopenshell_1655837113360/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.10/site-packages/ifcopenshell/_ifcopenshell_wrapper.so: undefined symbol: _ZN13SvgSerializer5writeERK13geometry_data
SvgSerializer::write(geometry_data const&)

I think this is due to -D BUILD_CONVERT:BOOL=OFF. Previously the serializers were only used in IfcConvert, now they're also used by the python wrapper. So it seems likely that something was misconfigured there. I've made some changes and added a CI workflow specific with this config. Let's see.

(2) The windows build fails on:

Unable to find GMP library files, aborting

It seems that build.sh was updated https://github.com/conda-forge/ifcopenshell-feedstock/blob/b5e097e371efd039f5757575b8de872957fac7f3/recipe/build.sh but bld.bat not https://github.com/conda-forge/ifcopenshell-feedstock/blob/b5e097e371efd039f5757575b8de872957fac7f3/recipe/bld.bat

(3) The OSX build fails on the iconv stuff

I have removed the non-ascii character from the subrepo.

I have created a new tag: v0.7.0a3 https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0a3

looooo commented 2 years ago

@aothms linux, osx:

ninja: error: '$PREFIX/lib/libhdf5_cpp.a', needed by 'IfcConvert', missing and no known rule to make it
conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

looooo commented 2 years ago

@conda-forge-admin, please rerender

conda-forge-linter commented 2 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

aothms commented 2 years ago

@looooo specifying HDF5_LIBRARY_DIR is buggy. Better specify HDF5_LIBRARIES: a semi-colon separated list of full library paths. In a typical linux setting you'd invoke it as "-DHDF5_LIBRARIES=/usr/lib/libhdf5_cpp.so;/usr/lib/libhdf5.so;/usr/lib/libz;/usr/lib/libSZ.so;/usr/lib/libaec.so" (mind the quotes so that the semi-colon is passed to cmake and not interpreted by the shell). The z SZ and aec libs depend on what compression libraries were compiled in with the HDF5.

looooo commented 2 years ago

@aothms is there no simpler way? Also I don't see HDF5_LIBRARIES used in this repo: https://github.com/Krande/IfcOpenShell/blob/pr-daily-builds/conda/build.sh

aothms commented 2 years ago

Also I don't see HDF5_LIBRARIES used in this repo:

@Krande made some changes for that in CMakeLists.txt https://github.com/Krande/IfcOpenShell/commits/pr-daily-builds/cmake Maybe you can share experiences and recommend a solution. I'm fine with everything as long as the official ifopsh win and nix builds keep working.

Krande commented 2 years ago

Hey @aothms and @looooo. It's been a while since I last looked at this. But I recently picked up where I left off in order to update my PR for the github actions build of ifcopenshell to support OCCT v7.6 (previously tested with 7.5.3).

In my latest attempt (github actions link here) I managed to compile for all platforms except Windows (which I hope to fix quickly).

One notable change I had to make in switching from OCCT v7.5 to v7.6 was to add a conditional import of BRepAdaptor_HCompCurve.hxx in the IfcTrimmedCurve.cpp file on line 34 like so image

Other than all related changes are found in

https://github.com/Krande/IfcOpenShell/blob/pr-daily-builds/cmake/CMakeLists.txt

and multiple files inside

https://github.com/Krande/IfcOpenShell/tree/pr-daily-builds/conda

Let me know if there is anything particular I can help out with.

Update:

Conda build of Ifcopenshell using OCCT v7.6 is working on all platforms in my latest github actions -> https://github.com/Krande/IfcOpenShell/actions/runs/2812814511

Note! That I am not performing all the unittests that are present in the ifcopenshell repo. All I do is a simple "import ifcopenshell"

looooo commented 2 years ago

@Krande thanks for your work. I am using your branch now and some linux builds are actually working. But still there are a lots of issues to be resolved.

Krande commented 2 years ago

@looooo Just happy to help!

Some comments regarding the current failing agents:

I did see a few random crashes on linux agents in my github actions pipeline (I suspect lack of memory on the virtual machine it's running on). When re-running them it seemed to work though.

Linux

I am seeing the same pattern on the 2 failing azure pipeline agents for linux (Bash exited with code '137' which is related to insufficient memory if I am not mistaken?). Maybe try re-running those and maybe they will be successful?

Windows

On these agents I see there's a Unable to find MPFR library files, error. I see that you haven't included MPFR_LIBRARY_DIR to your bld.bat file. Maybe try including -D MPFR_LIBRARY_DIR:FILEPATH="%LIBRARY_PREFIX%\lib" ^ to your bld.bat file and see what happens?

OSX

I see that there is an error related to git on the OSX machines.

==> /Users/runner/miniforge3/bin/git describe --tags --dirty <==

v0.6.0b0-4406-gd6f1a7e6

fatal: iconv_open(UTF-8,UTF-8-MAC) failed, but needed:
    precomposed unicode is not supported.
    If you want to use decomposed unicode, run
    "git config core.precomposeunicode false"

fatal: 'git status --porcelain=2' failed in submodule src/ifcopenshell-python/test/Sample-BIM-Files
Traceback (most recent call last):
  File "/Users/runner/miniforge3/lib/python3.9/site-packages/conda_build/source.py", line 361, in git_info
    stdout = check_output_env(cmd, stderr=stderr, cwd=src_dir, env=env)
  File "/Users/runner/miniforge3/lib/python3.9/site-packages/conda_build/utils.py", line 415, in check_output_env
    return _func_defaulting_env_to_os_environ('output', stdout=subprocess.PIPE,
  File "/Users/runner/miniforge3/lib/python3.9/site-packages/conda_build/utils.py", line 406, in _func_defaulting_env_to_os_environ
    out = subprocess.check_output(_args, **kwargs)
  File "/Users/runner/miniforge3/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/runner/miniforge3/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/runner/miniforge3/bin/git', 'status']' returned non-zero exit status 128.

@aothms Any ideas what the OSX error is? Am I using an outdated submodule or something like that? I see references to v0.6.0b0-4406-gd6f1a7e6 are we telling git to fetch the entire git history here?

looooo commented 2 years ago

thanks for your review @Krande . The osx issue was resolved by @aothms for the main branch of IfcOpenShell. IIRC there was an issue with the submodules.

Krande commented 2 years ago

Okay, I think I might have a suggestion to try to fix the OSX build (for the sake of testing the OSX builds).

Try specifying a shallow git_depth by changing the source definition in the meta.yaml file

from

source:
  git_url: https://github.com/Krande/IfcOpenShell
  git_tag: pr-daily-builds
  # sha256: ad488046939bf281025a75f8c656db9dc89a54d8b6539f8169acabba90f6a8ac

to

source:
  git_url: https://github.com/Krande/IfcOpenShell
  git_tag: pr-daily-builds
  git_depth: 1
  # sha256: ad488046939bf281025a75f8c656db9dc89a54d8b6539f8169acabba90f6a8ac

ref: https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#source-from-git

Krande commented 2 years ago

Hm, my bad :/ It seems that using git_tag pointing to a git branch + setting git_depth is not a valid solution.

Maybe I should just finalize my PR https://github.com/IfcOpenShell/IfcOpenShell/pull/2132 and once that's done then @aothms can create a new tag which you can use?

looooo commented 2 years ago

thanks @Krande for the continued support. Please ping me once the PR is merged.

Krande commented 2 years ago

@looooo The PR is merged and I have made a new tag "v0.7.0a4" which I think you should be able to use with the original Ifcopenshell repo.

Krande commented 2 years ago

Ping @looooo.

(In case my previous ping did not reach you:))

looooo commented 2 years ago

@krande thanks for the ping :)

Krande commented 2 years ago

@looooo If you think it might help you could add me as a maintainer and I could try to help fix the meta.yaml?

looooo commented 2 years ago

@Krande done, but I guess you will be able to work on the feedstock once the PR is merged. Currently only the osx-builds are not working due to some git issues.

Krande commented 2 years ago

@looooo

Okay, how about we use the url and sha256 of the tagged release v0.7.0a4 like this?

source:
  url: https://github.com/IfcOpenShell/IfcOpenShell/archive/refs/tags/{{ version }}.tar.gz
  sha256: e789a4545de50aae064ac2f3568ee41673c4391ab78751a4a034b7ca5a9a149e

Btw: As you said, I seem to be unable to push :) So I can probably be more helpful on the next PR! image

looooo commented 2 years ago

@Krande not sure if the subrepos are included if I use the zipped source. But I will try.

yes, as I expected, the subrepos are not included.

Krande commented 2 years ago

Ah, you're right. The submodules aren't included in the release files:(

I will take another look at it later today

looooo commented 2 years ago

@Krande I try to add the other repos too. Conda allows to specify multiple sources.