conda-forge / cdt-builds

conda-forge cdt builds
BSD 3-Clause "New" or "Revised" License
4 stars 22 forks source link

Is the `GL/glu.h` file included by any CDT package? #64

Closed capn-freako closed 1 year ago

capn-freako commented 1 year ago

Comment:

Even with all entries suggested here included in my build recipe:

requirements:
  build:
    - {{ compiler('c')   }}
    - {{ compiler('cxx') }}
    - {{ cdt('libx11-devel') }}          # [linux]
    - {{ cdt('xorg-x11-proto-devel') }}  # [linux]
    - {{ cdt('mesa-libgl-devel') }}      # [linux]
    - {{ cdt('mesa-dri-drivers') }}      # [linux]
    - {{ cdt('mesa-dri1-drivers') }}      # [linux]
    - {{ cdt('libselinux') }}            # [linux]
    - {{ cdt('libxdamage') }}            # [linux]
    - {{ cdt('libxxf86vm') }}            # [linux]
    - {{ cdt('libxext') }}               # [linux]
    - cmake
    - git
    - swig
  host:
    {snip}

I'm getting:

  In file included from kiva/gl/gl_wrap.cpp:3671:
  kiva/gl/src/kiva_gl_graphics_context.h:25:14: fatal error: GL/glu.h: No such file or directory
     25 |     #include <GL/glu.h>
        |              ^~~~~~~~~~
  compilation terminated.

And I'm wondering: does any CDT package provide the GL/glu.h file?

Is the following sufficient to claim that no CDT package includes the glu.h file? Asked differently, is every file that is included in, at least, one CDT package mentioned somewhere within the conda-forge/cdt-builds repo.?

$ git clone https://github.com/conda-forge/cdt-builds.git
Cloning into 'cdt-builds'...
{snip}

$ pushd cdt-builds/

$ git grep 'glu\.h'

$

Oh, I think I just answered my own question.
I know that the mesa-libgl-devel package provides the GL/gl.h file, but...

% git grep 'gl.h'
{no output}

So, then, how does one figure out whether a particular file is provided by a CDT package?

Thanks! -db

capn-freako commented 1 year ago

Made some progress:

~/prj/cdt-builds
% grep 'url:' cdts/mesa-libgl-devel-cos6-x86_64/meta.yaml
  - url: https://vault.centos.org/6.10/os/x86_64/Packages/mesa-libGL-devel-11.0.7-4.el6.x86_64.rpm
  # - url: http://vault.centos.org/6.10/os/Source/SPackages/mesa-11.0.7-4.el6.src.rpm

% curl --output mesa-libGL-devel-11.0.7-4.el6.x86_64.rpm https://vault.centos.org/6.10/os/x86_64/Packages/mesa-libGL-devel-11.0.7-4.el6.x86_64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  499k  100  499k    0     0  1401k      0 --:--:-- --:--:-- --:--:-- 1419k

% tar -tf mesa-libGL-devel-11.0.7-4.el6.x86_64.rpm | grep '\.h'
./usr/include/GL/gl.h
./usr/include/GL/gl_mangle.h
./usr/include/GL/glcorearb.h
./usr/include/GL/glext.h
./usr/include/GL/glx.h
./usr/include/GL/glx_mangle.h
./usr/include/GL/glxext.h
./usr/include/GL/internal/dri_interface.h

So, it looks like the GL/glu.h file is not supplied by the mesa-libGL-devel package.
Does anyone know which package does provide it?

capn-freako commented 1 year ago

Expanding my previous attempt to include all RPMs, via this script (print_all_files):

rm -rf rpms/ 2>/dev/null
mkdir rpms
for url in $(grep 'url:' cdts/*/meta.yaml | cut -f 2- -w | grep '^-' | cut -f 3 -w);
  do curl --output "rpms/${url##*/}" $url;
  done
for rpm in $(ls rpms/);
  do echo "\n${rpm}";
     echo "==========";
     tar tf "rpms/${rpm}" | sort;
  done

and then searching the resultant output:

% ./print_all_files >all_files

% grep 'GL/gl\.h' all_files
./usr/include/GL/gl.h
./usr/include/GL/gl.h
./usr/include/GL/gl.h
./usr/include/GL/gl.h

% grep 'GL/glu\.h' all_files
{no output}

I think I've satisfied myself that no CDT package provides the GL/glu.h file.

Should I submit a PR to the mesa-libgl-devel package adding it, or create a brand new package that just includes this new file?

beckermr commented 1 year ago

What is this header anyways? We should not edit an RPM to add a header arbitrarily. Where does it come from normally?

beckermr commented 1 year ago

This SO post might be helpful: https://stackoverflow.com/questions/55642506/my-ogl-program-cannot-find-gl-h-and-glu-h-anymore

capn-freako commented 1 year ago

What is this header anyways? We should not edit an RPM to add a header arbitrarily. Where does it come from normally?

It seems to come from this RPM: https://vault.centos.org/6.10/os/x86_64/Packages/mesa-libGLU-devel-11.0.7-4.el6.x86_64.rpm

$ curl --output mesa-libGLU-devel-11.0.7-4.el6.x86_64.rpm https://vault.centos.org/6.10/os/x86_64/Packages/mesa-libGLU-devel-11.0.7-4.el6.x86_64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 85456  100 85456    0     0   230k      0 --:--:-- --:--:-- --:--:--  230k

$ rpm2archive mesa-libGLU-devel-11.0.7-4.el6.x86_64.rpm

$ tar -t -f mesa-libGLU-devel-11.0.7-4.el6.x86_64.rpm.tgz
./usr/include/GL/glu.h
{snip}

which doesn't appear to be included in the current build configuration:

$ ls -d cdts/mesa-libgl*
cdts/mesa-libgl-cos6-x86_64/   cdts/mesa-libgl-devel-cos6-x86_64/   cdts/mesa-libglapi-cos7-aarch64/
cdts/mesa-libgl-cos7-aarch64/  cdts/mesa-libgl-devel-cos7-aarch64/  cdts/mesa-libglapi-cos7-ppc64le/
cdts/mesa-libgl-cos7-ppc64le/  cdts/mesa-libgl-devel-cos7-ppc64le/  cdts/mesa-libglapi-cos7-x86_64/
cdts/mesa-libgl-cos7-x86_64/   cdts/mesa-libgl-devel-cos7-x86_64/

Shall I create a new CDT package: mesa-libglu-devel-cos6-x86_64, using the existing mesa-libgl-devel-cos6-x86_64 package as a guide, in my own fork and submit a PR?

beckermr commented 1 year ago

Yes, please so make new CDTs if you need them!

capn-freako commented 1 year ago

How do I test with my new version of cdt-builds, locally and before my PR has been accepted?

beckermr commented 1 year ago

You can build it locally and then build your package with it.

capn-freako commented 1 year ago

You can build it locally and then build your package with it.

Thanks! That worked. My Enable build is now unstuck and completing successfully. :)

capn-freako commented 1 year ago

Added PR 65.