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

Are you willing to continue maintenance? Can't build normally. #101

Open
ovo-Tim opened this issue Jan 28, 2024 · 30 comments
Open

Are you willing to continue maintenance? Can't build normally. #101

ovo-Tim opened this issue Jan 28, 2024 · 30 comments

Comments

@ovo-Tim
Copy link

ovo-Tim commented Jan 28, 2024

Current Behavior

❯ cmake --build .
[  0%] Built target Adaptor2d
[  1%] Built target Adaptor3d
[  1%] Building CXX object CMakeFiles/AdvApp2Var.dir/src/AdvApp2Var.cxx.o
In file included from /tmp/download/pyOCCT-master/src/AdvApp2Var.cxx:63:
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx: In function ‘void bind_NCollection_Sequence(pybind11::module&, const std::string&, const pybind11::module_local&)’:
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx:61:85: Error:Cannot declare pointer to member 'void'
   61 | cls_NCollection_Sequence.def("Remove", (void (NCollection_Sequence<TheItemType>::*)(Iterator &)) &NCollection_Sequence<TheItemType>::Remove, "Remove one item", py::arg("thePosition"));
      |                                                                                     ^~~~~~~~
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx:61:41: Error:expected primary-expression before ‘void’
   61 | cls_NCollection_Sequence.def("Remove", (void (NCollection_Sequence<TheItemType>::*)(Iterator &)) &NCollection_Sequence<TheItemType>::Remove, "Remove one item", py::arg("thePosition"));
      |                                         ^~~~
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx:61:41: Error:expected ‘)’ before ‘void’
   61 | cls_NCollection_Sequence.def("Remove", (void (NCollection_Sequence<TheItemType>::*)(Iterator &)) &NCollection_Sequence<TheItemType>::Remove, "Remove one item", py::arg("thePosition"));
      |                                        ~^~~~
      |                                         )
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx:70:90: Error:Cannot declare pointer to member 'void'
   70 | cls_NCollection_Sequence.def("InsertAfter", (void (NCollection_Sequence<TheItemType>::*)(Iterator &, const TheItemType &)) &NCollection_Sequence<TheItemType>::InsertAfter, "InsertAfter the position of iterator", py::arg("thePosition"), py::arg("theItem"));
      |                                                                                          ^~~~~~~~
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx:70:46: Error:expected primary-expression before ‘void’
   70 | cls_NCollection_Sequence.def("InsertAfter", (void (NCollection_Sequence<TheItemType>::*)(Iterator &, const TheItemType &)) &NCollection_Sequence<TheItemType>::InsertAfter, "InsertAfter the position of iterator", py::arg("thePosition"), py::arg("theItem"));
      |                                              ^~~~
/tmp/download/pyOCCT-master/src/bind_NCollection_Sequence.hxx:70:46: Error:expected ‘)’ before ‘void’
   70 | cls_NCollection_Sequence.def("InsertAfter", (void (NCollection_Sequence<TheItemType>::*)(Iterator &, const TheItemType &)) &NCollection_Sequence<TheItemType>::InsertAfter, "InsertAfter the position of iterator", py::arg("thePosition"), py::arg("theItem"));
      |                                             ~^~~~
      |                                              )
make[2]: *** [CMakeFiles/AdvApp2Var.dir/build.make:76:CMakeFiles/AdvApp2Var.dir/src/AdvApp2Var.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:811:CMakeFiles/AdvApp2Var.dir/all] Error 2
make: *** [Makefile:136:all] Error 2

Steps to Reproduce (for bugs)

Just follow the steps that were written in readme.

Your Environment

  • Version used: 7.5.3.1
  • Operating System and version (desktop or mobile):
❯ neofetch
                   -`                    tim@TimTu-Arch 
                  .o+`                   -------------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Host: Code01 Ver2.0 1 
               `+oooooo:                 Kernel: 6.7.1-arch1-1 
               -+oooooo+:                Uptime: 24 mins 
             `/:-:++oooo+:               Packages: 1338 (pacman) 
            `/++++/+++++++:              Shell: bash 5.2.26 
           `/++++++++++++++:             Resolution: 2560x1600 
          `/+++ooooooooooooo/`           DE: Plasma 5.27.10 
         ./ooosssso++osssssso+`          WM: kwin 
        .oossssso-````/ossssss+`         Theme: NephriteLight [Plasma], Breeze [GTK2/3] 
       -osssssso.      :ssssssso.        Icons: [Plasma], Colloid [GTK2/3] 
      :osssssss/        osssso+++.       Terminal: konsole 
     /ossssssss/        +ssssooo/-       Terminal Font: Hack [SRC] 10 
   `/ossssso+/:-        -:/+osssso+-     CPU: AMD Ryzen 7 6800H with Radeon Graphics (16) @ 4.785GHz 
  `+sso+:-`                 `.-/+oso:    GPU: AMD ATI Radeon 680M 
 `++:.                           `-/+/   Memory: 11474MiB / 30808MiB 
 .`                                 `/
❯ conda list
# packages in environment at /tmp/occt_env:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
aom                       3.6.1                h59595ed_0    conda-forge
binutils_impl_linux-64    2.40                 hf600244_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.26.0               hd590300_0    conda-forge
ca-certificates           2023.11.17           hbcca054_0    conda-forge
clang                     17.0.6               hda56bd4_2    conda-forge
clang-17                  17.0.6          default_hb11cfb5_2    conda-forge
clang-format              17.0.6          default_hb11cfb5_2    conda-forge
clang-format-17           17.0.6          default_hb11cfb5_2    conda-forge
clang-tools               17.0.6          default_hb11cfb5_2    conda-forge
clangdev                  17.0.6          default_hb11cfb5_2    conda-forge
clangxx                   17.0.6          default_hb11cfb5_2    conda-forge
curl                      8.5.0                hca28451_0    conda-forge
double-conversion         3.2.0                h27087fc_1    conda-forge
eigen                     3.4.0                h00ab1b0_0    conda-forge
elfutils                  0.190                h6f2b95c_0    conda-forge
expat                     2.5.0                hcb278e6_1    conda-forge
ffmpeg                    4.4.2           gpl_hdf48244_113    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_1    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freeimage                 3.18.0              h530e30e_10    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
gettext                   0.21.1               h27087fc_0    conda-forge
gl2ps                     1.4.2                h0708190_0    conda-forge
gmp                       6.3.0                h59595ed_0    conda-forge
gnutls                    3.7.9                hb077bed_0    conda-forge
hdf4                      4.2.15               h9772cbc_5    conda-forge
hdf5                      1.12.2          nompi_h4df4325_101    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
imath                     3.1.6                h6239696_1    conda-forge
jpeg                      9e                   h0b41bf4_3    conda-forge
jsoncpp                   1.9.5                h4bd325d_1    conda-forge
jxrlib                    1.1                  hd590300_3    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_16    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
lcms2                     2.14                 h6ed2654_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libaec                    1.1.2                h59595ed_1    conda-forge
libarchive                3.7.2                h2aa1ff5_1    conda-forge
libclang                  17.0.6          default_hb11cfb5_2    conda-forge
libclang-cpp              17.0.6          default_hb11cfb5_2    conda-forge
libclang-cpp17            17.0.6          default_hb11cfb5_2    conda-forge
libclang13                17.0.6          default_ha2b6cf4_2    conda-forge
libcurl                   8.5.0                hca28451_0    conda-forge
libdeflate                1.14                 h166bdaf_0    conda-forge
libdrm                    2.4.114              h166bdaf_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-devel_linux-64     13.2.0             ha9c7c90_104    conda-forge
libgcc-ng                 13.2.0               h807b86a_4    conda-forge
libgfortran-ng            13.2.0               h69a702a_4    conda-forge
libgfortran5              13.2.0               ha4646dd_4    conda-forge
libgomp                   13.2.0               h807b86a_4    conda-forge
libhwloc                  2.9.3           default_h554bfaf_1009    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libidn2                   2.3.7                hd590300_0    conda-forge
libllvm17                 17.0.6               hb3ce162_1    conda-forge
libmicrohttpd             0.9.77               h97afed2_0    conda-forge
libnetcdf                 4.8.1           nompi_h261ec11_106    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libpciaccess              0.17                 h166bdaf_0    conda-forge
libpng                    1.6.39               h753d276_0    conda-forge
libraw                    0.20.2               h9772cbc_2    conda-forge
libsqlite                 3.44.2               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-devel_linux-64  13.2.0             ha9c7c90_104    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_4    conda-forge
libtasn1                  4.19.0               h166bdaf_0    conda-forge
libtheora                 1.1.1             h7f98852_1005    conda-forge
libtiff                   4.4.0                h82bc61c_5    conda-forge
libunistring              0.9.10               h7f98852_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libva                     2.20.0               hd590300_0    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libvpx                    1.13.1               h59595ed_0    conda-forge
libwebp-base              1.3.2                hd590300_0    conda-forge
libxcb                    1.15                 h0b41bf4_0    conda-forge
libxml2                   2.12.4               h232c23b_1    conda-forge
libzip                    1.10.1               h2629f0a_3    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
llvm-tools                17.0.6               hb3ce162_1    conda-forge
llvmdev                   17.0.6               hb3ce162_1    conda-forge
loguru                    0.6.0            py37h89c1867_1    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mesalib                   23.3.4               hf257a20_0    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
nettle                    3.9.1                h7ab15ed_0    conda-forge
occt                      7.5.3                h665cfa0_4    conda-forge
openexr                   3.1.5                h0cdce71_2    conda-forge
openh264                  2.3.1                hcb278e6_2    conda-forge
openjpeg                  2.5.0                h7d73246_1    conda-forge
openssl                   3.2.0                hd590300_1    conda-forge
p11-kit                   0.24.1               hc5aa10d_0    conda-forge
pip                       23.3.2             pyhd8ed1ab_0    conda-forge
proj                      9.0.1                h93bde94_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pugixml                   1.11.4               h59595ed_1    conda-forge
python                    3.7.12          hf930737_100_cpython    conda-forge
python-clang              17.0.6          default_hccd1708_2    conda-forge
python_abi                3.7                     4_cp37m    conda-forge
rapidjson                 1.1.0             he1b5a44_1002    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                69.0.3             pyhd8ed1ab_0    conda-forge
sqlite                    3.44.2               h2c6b66d_0    conda-forge
svt-av1                   1.4.1                hcb278e6_0    conda-forge
sysroot_linux-64          2.12                he073ed8_16    conda-forge
tbb                       2021.11.0            h00ab1b0_1    conda-forge
tbb-devel                 2021.11.0            h5ccd973_1    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
utfcpp                    4.0.5                ha770c72_0    conda-forge
vtk                       9.1.0           osmesa_py37h4fefe72_115    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h166bdaf_2    conda-forge
x265                      3.5                  h924138e_3    conda-forge
xorg-damageproto          1.2.1             h7f98852_1002    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-glproto              1.4.17            h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.7                h8ee46fc_0    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdamage           1.1.5                h7f98852_1    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxrandr            1.5.2                h7f98852_1    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-libxt                1.3.0                hd590300_1    conda-forge
xorg-randrproto           1.5.0             h7f98852_1001    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-util-macros          1.19.3               h7f98852_0    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zlib                      1.2.13               hd590300_5    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge
@trelau
Copy link
Owner

trelau commented Jan 28, 2024

hi @ovo-Tim . although i wish i could, it's been difficult to find much time to work on this project, so i can't commit to continued maintenance or any levels of support at this time.

If you haven't already, check out pythonocc. It has a pretty stable build system and I think is readily available on conda. if you're wondering why i made pyOCCT, i answered that here on stackoverflow just fyi

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 29, 2024

If you haven't already, check out pythonocc. It has a pretty stable build system and I think is readily available on conda.

@trelau Thanks for your reply. In fact, I have used pythonocc for a long time. But I'm trying to switch to pyOCCT. Compared with pythonocc, I think pyOCCT provide interface that closer to native and support more module.

although i wish i could, it's been difficult to find much time to work on this project, so i can't commit to continued maintenance or any levels of support at this time.

If I made some updates, should I create a pull request?

@frmdstryr
Copy link
Contributor

frmdstryr commented Jan 29, 2024

If you're on linux you can try https://github.com/frmdstryr/pyOCCT/tree/v7.8.0, I haven't been maintaining CI or windows builds.

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

@frmdstryr Thanks a lot.

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

@frmdstryr I have built successfully!

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

I have built a new conda package. https://anaconda.org/ovo-tim/pyocct

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

@frmdstryr Hi, I found that the conda_build can't output the right package.
(It outputted wrong python version)
image
https://anaconda.org/ovo-tim/pyocct/7.8.0.0/download/linux-64/pyocct-7.8.0.0-py39_100.tar.bz2

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

@frmdstryr Hi, I found that the conda_build can't output the right package. (It outputted wrong python version) image https://anaconda.org/ovo-tim/pyocct/7.8.0.0/download/linux-64/pyocct-7.8.0.0-py39_100.tar.bz2

I think we should set python ver at 'meta.yaml', like:

  host:
    - python {{ python }}
    - pybind11
    - occt ==7.8.0
    - tbb-devel

  run:
    - python {{ python }}.*
    - occt ==7.8.0

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

https://anaconda.org/ovo-tim/pyocct/files
All right, pyOCCT for linux is available now. But I can't make windows and MacOS builder work.

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 30, 2024

@frmdstryr How do you think if we create a new repository called pyOCCT2, and continue to maintain it.😉

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 31, 2024

@frmdstryr Hi, I found that I couldn't run pyOCCT-7.8.0:

❯ python import_step.py
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1176, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: generic_type: type "TColgp_Array2OfPnt" referenced unknown base type "NCollection_Array1<gp_Pnt>"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1176, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: initialization failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/下载/pyOCCT-7.8.0/examples/import_step.py", line 20, in <module>
    from OCCT.Graphic3d import Graphic3d_NOM_ALUMINIUM
ImportError: initialization failed

By the way, can you enable issues in your repository?

@frmdstryr
Copy link
Contributor

Oh sorry, it looks like I forgot to commit a few changes I had locally. I updated the branch and binder repo.

I don't want to create a fork or separate issue tracker. Perhaps someone can contribute updates to fix CI & windows builds.

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 31, 2024

@frmdstryr Hi, I found a strange bug. You have changed directly pyOCCT_binder in pyOCCT, but you didn't update the code in https://github.com/frmdstryr/pyOCCT_binder. That makes this repository disordered.

image
I can't clone it now, everything is in a mess.

@frmdstryr
Copy link
Contributor

I guess committing a submodule doesn't update the branch. Anyways I merged the binder branch I was on to my master branch, does it work now?

@ovo-Tim
Copy link
Author

ovo-Tim commented Jan 31, 2024

I guess committing a submodule doesn't update the branch. Anyways I merged the binder branch I was on to my master branch, does it work now?

Thanks for your work. But I think I'm in a big trouble now. It seems the link was linked to an inexistence branch.
image
image

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 1, 2024

@frmdstryr I don't know why, but it still happened on the conda package that I built.

If I try to build locally, it outputs:

❯ python import_step.py
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 565, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1173, in create_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: generic_type: type "NCollection_BaseAllocator" referenced unknown base type "Standard_Transient"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 565, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1173, in create_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: initialization failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 565, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1173, in create_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: initialization failed

@frmdstryr
Copy link
Contributor

I use some custom occt patches so my occt and pyocct are always built with the exact same compiler version. Can you try building occt locally and then pyocct to make sure there is no difference in compiler versions?

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 1, 2024

@frmdstryr Thanks for your help again, I will try that tomorrow. (I hope you don't mind me asking, but may I know which country you are from? This way, I can better coordinate our communication considering the time zones. I'm based in China, and it's quite late for me to continue working now.😉)

@frmdstryr
Copy link
Contributor

I'm in the eastern timezone. I got CI to actually build and test but it appears the bindings are not being generated correctly for some reason (it is not doing some +before_type lines that should fix the errors).

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 2, 2024

I'm trying to make CI build the latest VTK and OCCT. I hope that can help.

- name: "Build VTK"
  run: |
    cd ~
    sudo apt install -y build-essential cmake git unzip libqt5opengl5-dev libqt5x11extras5-dev libeigen3-dev libboost-all-dev libglew-dev libglvnd-dev
    git clone https://gitlab.kitware.com/vtk/vtk.git
    cd vtk
    mkdir build
    cd build
    cmake ..
    make
    sudo make install

- name: "Build OCCT"
  run: |
    cd ~
    sudo apt-get install software-properties-common
    sudo apt-get install libtool autoconf automake gfortran gdebi
    sudo apt-get install gcc-multilib libxi-dev libxmu-dev libxmu-headers
    sudo apt-get install libx11-dev mesa-common-dev libglu1-mesa-dev
    sudo apt-get install libfontconfig1-dev
    sudo apt-get install libfreetype6 libfreetype6-dev
    sudo apt-get install tcl tcl-dev tk tk-dev

    wget https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V7_8_0.tar.gz
    tar -xzf V7_8_0.tar.gz
    cd OCCT-V7_8_0
    mkdir build
    cd build
    sudo cmake .. -DUSE_VTK=ON -D3RDPARTY_VTK_INCLUDE_DIR=/usr/include/vtk/
    sudo make install

@frmdstryr
Copy link
Contributor

Since the bindings are not correct, I think rebuilding occt is not necessary (not sure what I was thinking the other day).

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 2, 2024

Look forward to your work. 😉

@frmdstryr
Copy link
Contributor

Looks like the before_type lines in the config didn't work with typedefs (I guess I had added them manually and did not regenerate since when I build locally regenerating flushes the build cache). I pushed an update so hopefully that fixes it.

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 3, 2024

@frmdstryr It looks like the error message has changed, but it still doesn't work.

❯ python import_step.py
ImportError: generic_type: type "StepGeom_Array2OfSurfacePatch" referenced unknown base type "NCollection_Array1<opencascade::handle<StepGeom_SurfacePatch> >"

The above exception was the direct cause of the following exception:

ImportError: initialization failed

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 3, 2024

I'm trying to build OCCT 7.8.0 (so that I can build pyOCCT locally). But I met a problem: https://dev.opencascade.org/content/build-failed-vtk-addlibrary-cannot-create-target-tkernel-because-imported-target-same-name

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 3, 2024

@frmdstryr Hey, it's work!
image

I just try to modify this:
image

@ovo-Tim
Copy link
Author

ovo-Tim commented Feb 3, 2024

Hi. Recently, I have read a post, it said OCP is better than pyOCCT and pythonOCC. Have you ever heard of OCP? Is it more convenient to maintenance? I found it hasn't been upgraded to the latest version.

@trelau
Copy link
Owner

trelau commented Feb 3, 2024

Hi. Recently, I have read a post, it said OCP is better than pyOCCT and pythonOCC. Have you ever heard of OCP? Is it more convenient to maintenance? I found it hasn't been upgraded to the latest version.

as far as i know, OCP uses pybind11 to generate python bindings, clang to parse the headers, and some sort of templating system to actually write the pybind11 bindings. so, i think, very similar to pyOCCT except I use clang to parse the headers and a "hand rolled" binding generator written in python. in my view, the destination is the same (python bindings of OCCT via pybind11), but the mechanisms to get there are different. if OCP is somehow easier to keep up to date and does a better job of handling all of the OCCT C++ nuances, then it might be worth a look, i guess.

@frmdstryr
Copy link
Contributor

frmdstryr commented Feb 3, 2024

@trelau, how did the isinstance checks work on the HArray's before? I had to disable that check frmdstryr@a143524 to get the linux builds to pass the tests.

IDK how it ever worked since the second base class is missing in the bind_Define_HArrayx.cxx headers?

Edit: more strangely the HSequence isinstance check passes but the HArray one doesnt.

@trelau
Copy link
Owner

trelau commented Feb 3, 2024

@frmdstryr i don't remember the details, but looks like I had to do some special tricks here if that gives you any clues. Looks like I added methods to the type from the base class but didn't have the inheritance for some reason. why the isinstance worked (or didn't) i can't think of off the top of my head...

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

3 participants