I finally found a working solution!
I had to delete the cache directory and patch the opengl.egg file.

$ cat i686-w64-mingw32-chicken-opengl-1.22.sh
set -e
NAME="i686-w64-mingw32-chicken-opengl"
VERSION="1.22"
DIR="opengl-${VERSION}"
DESTDIR="/tmp/${NAME}-${VERSION}"
CACHEDIR=/tmp/chicken-cache
tar xvf ${DIR}.tar.gz
patch -p0 < ${NAME}-${VERSION}.patch
cd ${DIR}
rm -rfv ${CACHEDIR}
CHICKEN_EGG_CACHE=${CACHEDIR} \
        DESTDIR=${DESTDIR} \
        i686-w64-mingw32-chicken-install \
        -host
rm -rfv ${CACHEDIR}
CHICKEN_EGG_CACHE=${CACHEDIR} \
        DESTDIR=${DESTDIR} \
        i686-w64-mingw32-chicken-install \
        -D windows \
        -target
cd -
rm -rfv ${DIR}

$ cat i686-w64-mingw32-chicken-opengl-1.22.patch
diff -ruN opengl-1.22.ori/opengl.egg opengl-1.22/opengl.egg
--- opengl-1.22.ori/opengl.egg  2026-09-26 09:38:45.088385502 +0200
+++ opengl-1.22/opengl.egg      2026-09-26 09:39:48.104655292 +0200
@@ -9,7 +9,8 @@
    (extension glu
                (cond-expand
                  (windows
-                   (link-options "-lopengl32" "-lglu32"))
+                   (csc-options "-D" "windows")
+                   (link-options "-L" "-lopengl32" "-L" "-lglu32"))
                  (macosx
                    (csc-options "-FOpenGL")
                    (link-options "-L" "-framework OpenGL"
@@ -23,7 +24,8 @@
    (extension gl
               (cond-expand
                 (windows
-                  (link-options "-lopengl32"))
+                  (csc-options "-D" "windows")
+                  (link-options "-L" "-lopengl32"))
                 (macosx
                   (csc-options "-FOpenGL")
                   (link-options "-L" "-framework OpenGL"

Result:
$ tree /tmp/i686-w64-mingw32-chicken-opengl-1.22
/tmp/i686-w64-mingw32-chicken-opengl-1.22
└── usr
    ├── i686-w64-mingw32
    │   └── lib
    │       └── chicken
    │           └── 11
    │               ├── gl.import.so
    │               ├── gl.link
    │               ├── gl.o
    │               ├── gl.so
    │               ├── glu.import.so
    │               ├── glu.link
    │               ├── glu.o
    │               ├── glu.so
    │               └── opengl.egg-info
    └── lib
        └── i686-w64-mingw32-chicken
            └── 11
                ├── gl.import.so
                ├── gl.link
                ├── gl.o
                ├── gl.so
                ├── glu.import.so
                ├── glu.link
                ├── glu.o
                ├── glu.so
                └── opengl.egg-info

8 directories, 18 files

Problem fixed.
Thank you.

On 26/09/2026 08:45, YuGiOhJCJ wrote:
I tried this:
$ cat i686-w64-mingw32-chicken-opengl-1.22.sh
set -e
NAME="i686-w64-mingw32-chicken-opengl"
VERSION="1.22"
DIR="opengl-${VERSION}"
DESTDIR="/tmp/${NAME}-${VERSION}"
tar xvf ${DIR}.tar.gz
cd ${DIR}
DESTDIR=${DESTDIR} CHICKEN_EGG_CACHE=/tmp/chicken-cache 
i686-w64-mingw32-chicken-install
CHICKEN_EGG_CACHE=/tmp/chicken-cache \
     DESTDIR=${DESTDIR} \
     i686-w64-mingw32-chicken-install \
     -host
export CSC_OPTIONS='-feature windows'
CHICKEN_EGG_CACHE=/tmp/chicken-cache \
     DESTDIR=${DESTDIR} \
     i686-w64-mingw32-chicken-install \
     -target
cd -
rm -rfv ${DIR}

Result:
$ ./i686-w64-mingw32-chicken-opengl-1.22.sh
[...]
/usr/lib/gcc/i686-w64-mingw32/11.4.0/../../../../i686-w64-mingw32/bin/ld: 
cannot find -lGLU
collect2: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 256: 
'i686-w64-mingw32-gcc' '/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.o' -o 
'/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.target' '-shared' '-LX11' 
'-lGLU' '-L/usr/i686-w64-mingw32/lib' '-Wl,-rpath=/usr/i686-w64-mingw32/lib' 
-lchicken -lm -lws2_32

Error: shell command terminated with nonzero exit code
256
"sh /tmp/build/i686-w64-mingw32/opengl-1.22/opengl.build.target.sh"

Also, I tried this:
$ cat i686-w64-mingw32-chicken-opengl-1.22.sh
set -e
NAME="i686-w64-mingw32-chicken-opengl"
VERSION="1.22"
DIR="opengl-${VERSION}"
DESTDIR="/tmp/${NAME}-${VERSION}"
tar xvf ${DIR}.tar.gz
cd ${DIR}
DESTDIR=${DESTDIR} CHICKEN_EGG_CACHE=/tmp/chicken-cache 
i686-w64-mingw32-chicken-install
CHICKEN_EGG_CACHE=/tmp/chicken-cache \
     DESTDIR=${DESTDIR} \
     i686-w64-mingw32-chicken-install \
     -host
CHICKEN_EGG_CACHE=/tmp/chicken-cache \
     DESTDIR=${DESTDIR} \
     i686-w64-mingw32-chicken-install \
     -D windows \
     -target
cd -
rm -rfv ${DIR}

Result:
$ ./i686-w64-mingw32-chicken-opengl-1.22.sh
[...]
/usr/lib/gcc/i686-w64-mingw32/11.4.0/../../../../i686-w64-mingw32/bin/ld: 
cannot find -lGLU
collect2: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 256: 
'i686-w64-mingw32-gcc' '/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.o' -o 
'/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.target' '-shared' '-LX11' 
'-lGLU' '-L/usr/i686-w64-mingw32/lib' '-Wl,-rpath=/usr/i686-w64-mingw32/lib' 
-lchicken -lm -lws2_32

Error: shell command terminated with nonzero exit code
256
"sh /tmp/build/i686-w64-mingw32/opengl-1.22/opengl.build.target.sh"

About your question about how I built chicken, I built two things:

1. The cross compiler:
$ cat i686-w64-mingw32-chicken-5.4.0.sh
set -e
DIR="chicken-5.4.0"
DESTDIR="/tmp/i686-w64-mingw32-${DIR}"
tar xvf ${DIR}.tar.gz
cd ${DIR}
make ${NUMJOBS} install \
     PLATFORM=linux \
     PREFIX=/usr \
     PROGRAM_PREFIX=i686-w64-mingw32- \
     TARGET_PREFIX=/usr/i686-w64-mingw32 \
     TARGETSYSTEM=i686-w64-mingw32 \
     TARGET_LIBRARIES="-lm -lws2_32" \
     DESTDIR=${DESTDIR} \
     install
cd -
rm -rfv ${DIR}

2. The runtime
$ cat i686-w64-mingw32-chicken-runtime-5.4.0.sh
set -e
NAME="chicken-runtime"
VERSION="5.4.0"
DIR="chicken-${VERSION}"
DESTDIR="/tmp/i686-w64-mingw32-${NAME}-${VERSION}"
tar xvf ${DIR}.tar.gz
cd ${DIR}
make ${NUMJOBS} \
     PLATFORM=cross-linux-mingw \
     HOSTSYSTEM=i686-w64-mingw32 \
     PREFIX=/usr/i686-w64-mingw32 \
     LIBDIR=/usr/i686-w64-mingw32/lib${LIBDIRSUFFIX} \
     MANDIR=/usr/i686-w64-mingw32/man \
     DOCDIR=/usr/i686-w64-mingw32/doc/${NAME}-${VERSION} \
     DESTDIR=${DESTDIR}
make ${NUMJOBS} install \
     PLATFORM=cross-linux-mingw \
     HOSTSYSTEM=i686-w64-mingw32 \
     PREFIX=/usr/i686-w64-mingw32 \
     LIBDIR=/usr/i686-w64-mingw32/lib${LIBDIRSUFFIX} \
     MANDIR=/usr/i686-w64-mingw32/man \
     DOCDIR=/usr/i686-w64-mingw32/doc/${NAME}-${VERSION} \
     DESTDIR=${DESTDIR}
cd -
rm -rfv ${DIR}

So, I used PLATFORM=linux for the cross compiler and PLATFORM=cross-linux-mingw 
for the runtime.

I recall that I am able to cross build several eggs that are working with my 
tool chain so I think chicken itself has been built correctly.
I just have a problem with the opengl egg because it thinks I build for Linux 
whereas I am building for Windows.

So, I am still stuck, I can't cross compile the opengl egg from Linux to 
Windows.

On 25/09/2026 19:39, Kristian Lein-Mathisen wrote:

Let me correct myself, I don't think that's good advice. Tempting as this is:

$ env CSC_OPTIONS='-feature windows' ./i686-w64-mingw32-chicken-opengl-1.22.sh 
<http://i686-w64-mingw32-chicken-opengl-1.22.sh/>

It will probably make everything think it's on windows, including macro 
expansion and the first host-side build of the cross compilation. That is not 
what we want.

Is PLATFORM=cross-linux-mingw set correctly in your make invokation when 
building Chicken? If I'm not mistaken, that should first build on the host 
(PLATFORM=linux) and then build things for the target (PLATFORM=windows).

Hope this gives you some pointers. cross-compilation is hard, and even harder 
with macros/syntax!

K.

On Fri, Sep 25, 2026, 16:54 Kristian Lein-Mathisen <[email protected] 
<mailto:[email protected]>> wrote:


    Hi,

    I don't know if it's of much help, but it seems your cond-expand is using 
the fallbavk (-LX11 -L -lGLU), not the windows-specific. Probably because 
you're not _actually_ on windows.

    Perhaps try to edit your opengl.ogg file directly and see if that work. 
Otherwise, see if you can inject a register-feature! call [1] before the build. 
I


    K.
    1 https://api.call-cc.org/5/doc/chicken/platform#sec:register-feature.21 
<https://api.call-cc.org/5/doc/chicken/platform#sec:register-feature.21>

    On Wed, Sep 23, 2026, 15:01 YuGiOhJCJ via Chicken-users <[email protected] 
<mailto:[email protected]>> wrote:

        Hello,

        I am on Linux (64-bit).
        I try to cross compile the opengl egg from Linux (64-bit) to Windows 
(32-bit).
        https://code.call-cc.org/egg-tarballs/5/opengl/opengl-1.22.tar.gz 
<https://code.call-cc.org/egg-tarballs/5/opengl/opengl-1.22.tar.gz>

        My first attempt was with this script:
        $ cat i686-w64-mingw32-chicken-opengl-1.22.sh 
<http://i686-w64-mingw32-chicken-opengl-1.22.sh>
        set -e
        NAME="i686-w64-mingw32-chicken-opengl"
        VERSION="1.22"
        DIR="opengl-${VERSION}"
        DESTDIR="/tmp/${NAME}-${VERSION}"
        tar xvf ${DIR}.tar.gz
        cd ${DIR}
        DESTDIR=${DESTDIR} CHICKEN_EGG_CACHE=/tmp/chicken-cache 
i686-w64-mingw32-chicken-install

        Result:
        $ ./i686-w64-mingw32-chicken-opengl-1.22.sh 
<http://i686-w64-mingw32-chicken-opengl-1.22.sh>
        opengl-1.22/
        opengl-1.22/gl.scm
        tar: opengl-1.22/gl.scm: implausibly old time stamp 1970-01-01 00:00:00
        opengl-1.22/glu.scm
        tar: opengl-1.22/glu.scm: implausibly old time stamp 1970-01-01 00:00:00
        opengl-1.22/opengl.egg
        tar: opengl-1.22/opengl.egg: implausibly old time stamp 1970-01-01 
00:00:00
        tar: opengl-1.22: implausibly old time stamp 1970-01-01 00:00:00
        building opengl
             /usr/bin/i686-w64-mingw32-csc -host -D compiling-extension -J -s 
-regenerate-import-libraries -setup-mode -I 
/tmp/build/i686-w64-mingw32/opengl-1.22 -C 
-I/tmp/build/i686-w64-mingw32/opengl-1.22 -O2 -d1 -LX11 -L -lGLU glu.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so
             /usr/bin/i686-w64-mingw32-csc -regenerate-import-libraries -M 
-setup-mode -static -I /tmp/build/i686-w64-mingw32/opengl-1.22 -emit-link-file 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.link -host -D compiling-extension 
-c -unit glu -D compiling-static-extension -C 
-I/tmp/build/i686-w64-mingw32/opengl-1.22 -O2 -d1 glu.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.static.o
             /usr/bin/i686-w64-mingw32-csc -setup-mode -s -host -I 
/tmp/build/i686-w64-mingw32/opengl-1.22 -C -I/tmp/build/i686-w64-mingw32/opengl-1.22 
-O2 -d0 -LX11 -L -lGLU glu.import.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.import.so <http://glu.import.so>
             /usr/bin/i686-w64-mingw32-csc -host -D compiling-extension -J -s 
-regenerate-import-libraries -setup-mode -I 
/tmp/build/i686-w64-mingw32/opengl-1.22 -C 
-I/tmp/build/i686-w64-mingw32/opengl-1.22 -O2 -d1 -LX11 -L -lGL gl.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/gl.so
             /usr/bin/i686-w64-mingw32-csc -regenerate-import-libraries -M 
-setup-mode -static -I /tmp/build/i686-w64-mingw32/opengl-1.22 -emit-link-file 
/tmp/build/i686-w64-mingw32/opengl-1.22/gl.link -host -D compiling-extension -c 
-unit gl -D compiling-static-extension -C 
-I/tmp/build/i686-w64-mingw32/opengl-1.22 -O2 -d1 gl.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/gl.static.o
             /usr/bin/i686-w64-mingw32-csc -setup-mode -s -host -I 
/tmp/build/i686-w64-mingw32/opengl-1.22 -C -I/tmp/build/i686-w64-mingw32/opengl-1.22 
-O2 -d0 -LX11 -L -lGL gl.import.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/gl.import.so <http://gl.import.so>
        installing opengl
        building opengl (target)
             /usr/bin/i686-w64-mingw32-csc -D compiling-extension -J -s 
-regenerate-import-libraries -setup-mode -I 
/tmp/build/i686-w64-mingw32/opengl-1.22 -C 
-I/tmp/build/i686-w64-mingw32/opengl-1.22 -O2 -d1 -LX11 -L -lGLU glu.scm -o 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.target
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1517':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:107:28: warning: 
passing argument 3 of 'gluNurbsCallback' from incompatible pointer type 
[-Wincompatible-pointer-types]
            107 | gluNurbsCallback(a0 , a1 , a2);
                |                            ^~
                |                            |
                |                            void (*)()
        In file included from 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:14:
        /usr/i686-w64-mingw32/include/GL/glu.h:94:76: note: expected 'void 
(__attribute__((stdcall)) *)()' but argument is of type 'void (*)()'
             94 | void APIENTRY gluNurbsCallback(GLUnurbs *nobj,GLenum 
which,void (CALLBACK *fn)());
                |                                                            
~~~~~~~~~~~~~~~~^~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1503':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:119:30: warning: 
passing argument 3 of 'gluQuadricCallback' from incompatible pointer type 
[-Wincompatible-pointer-types]
            119 | gluQuadricCallback(a0 , a1 , a2);
                |                              ^~
                |                              |
                |                              void (*)()
        In file included from 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:14:
        /usr/i686-w64-mingw32/include/GL/glu.h:68:80: note: expected 'void 
(__attribute__((stdcall)) *)()' but argument is of type 'void (*)()'
             68 | void APIENTRY gluQuadricCallback(GLUquadric *qobj,GLenum 
which,void (CALLBACK *fn)());
                |                                                               
 ~~~~~~~~~~~~~~~~^~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1489':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:131:27: warning: 
passing argument 3 of 'gluTessCallback' from incompatible pointer type 
[-Wincompatible-pointer-types]
            131 | gluTessCallback(a0 , a1 , a2);
                |                           ^~
                |                           |
                |                           void (*)()
        In file included from 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:14:
        /usr/i686-w64-mingw32/include/GL/glu.h:78:80: note: expected 'void 
(__attribute__((stdcall)) *)()' but argument is of type 'void (*)()'
             78 | void APIENTRY gluTessCallback(GLUtesselator *tess,GLenum 
which,void (CALLBACK *fn)());
                |                                                               
 ~~~~~~~~~~~~~~~~^~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1433':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:153:8: warning: 
implicit declaration of function 'gluUnProject4'; did you mean 'gluUnProject'? 
[-Wimplicit-function-declaration]
            153 | return(gluUnProject4(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , 
a8 , a9 , a10 , a11 , a12));
                |        ^~~~~~~~~~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:137:54: note: in 
definition of macro 'return'
            137 | #define return(x) C_cblock C_r = (C_int_to_num(&C_a,(x))); 
goto C_ret; C_cblockend
                |                                                      ^
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1411':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:164:1: warning: 
implicit declaration of function 'gluNurbsCallbackDataEXT'; did you mean 
'gluNurbsCallback'? [-Wimplicit-function-declaratio ]
            164 | gluNurbsCallbackDataEXT(a0 , a1);
                | ^~~~~~~~~~~~~~~~~~~~~~~
                | gluNurbsCallback
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1400':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:175:1: warning: 
implicit declaration of function 'gluNurbsCallbackData'; did you mean 
'gluNurbsCallback'? [-Wimplicit-function-declaration]
            175 | gluNurbsCallbackData(a0 , a1);
                | ^~~~~~~~~~~~~~~~~~~~
                | gluNurbsCallback
        In file included from 
/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:8:
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1389':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:186:8: warning: 
implicit declaration of function 'gluCheckExtension' 
[-Wimplicit-function-declaration]
            186 | return(gluCheckExtension(a0 , a1));
                |        ^~~~~~~~~~~~~~~~~
        /usr/i686-w64-mingw32/include/chicken/chicken.h:1048:50: note: in 
definition of macro 'C_make_character'
           1048 | #define C_make_character(c)        (((((C_uword)(c)) & 
C_CHAR_BIT_MASK) << C_CHAR_SHIFT) | C_CHARACTER_BITS)
                |                                                  ^
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:186:1: note: in 
expansion of macro 'return'
            186 | return(gluCheckExtension(a0 , a1));
                | ^~~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1366':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:203:8: warning: 
implicit declaration of function 'gluBuild3DMipmaps'; did you mean 
'gluBuild2DMipmaps'? [-Wimplicit-function-declaration]
            203 | return(gluBuild3DMipmaps(a0 , a1 , a2 , a3 , a4 , a5 , a6 , 
a7));
                |        ^~~~~~~~~~~~~~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:192:54: note: in 
definition of macro 'return'
            192 | #define return(x) C_cblock C_r = (C_int_to_num(&C_a,(x))); 
goto C_ret; C_cblockend
                |                                                      ^
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1331':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:223:8: warning: 
implicit declaration of function 'gluBuild3DMipmapLevels'; did you mean 
'gluBuild2DMipmaps'? [-Wimplicit-function-declaratio ]
            223 | return(gluBuild3DMipmapLevels(a0 , a1 , a2 , a3 , a4 , a5 , 
a6 , a7 , a8 , a9 , a10));
                |        ^~~~~~~~~~~~~~~~~~~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:209:54: note: in 
definition of macro 'return'
            209 | #define return(x) C_cblock C_r = (C_int_to_num(&C_a,(x))); 
goto C_ret; C_cblockend
                |                                                      ^
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1295':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:242:8: warning: 
implicit declaration of function 'gluBuild2DMipmapLevels'; did you mean 
'gluBuild2DMipmaps'? [-Wimplicit-function-declaratio ]
            242 | return(gluBuild2DMipmapLevels(a0 , a1 , a2 , a3 , a4 , a5 , 
a6 , a7 , a8 , a9));
                |        ^~~~~~~~~~~~~~~~~~~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:229:54: note: in 
definition of macro 'return'
            229 | #define return(x) C_cblock C_r = (C_int_to_num(&C_a,(x))); 
goto C_ret; C_cblockend
                |                                                      ^
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c: In function 
'stub1262':
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:260:8: warning: 
implicit declaration of function 'gluBuild1DMipmapLevels'; did you mean 
'gluBuild1DMipmaps'? [-Wimplicit-function-declaratio ]
            260 | return(gluBuild1DMipmapLevels(a0 , a1 , a2 , a3 , a4 , a5 , 
a6 , a7 , a8));
                |        ^~~~~~~~~~~~~~~~~~~~~~
        /tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.c:248:54: note: in 
definition of macro 'return'
            248 | #define return(x) C_cblock C_r = (C_int_to_num(&C_a,(x))); 
goto C_ret; C_cblockend
                |                                                      ^
        
/usr/lib/gcc/i686-w64-mingw32/11.4.0/../../../../i686-w64-mingw32/bin/ld: 
cannot find -lGLU
        collect2: error: ld returned 1 exit status

        Error: shell command terminated with non-zero exit status 256: 
'i686-w64-mingw32-gcc' '/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.o' -o 
'/tmp/build/i686-w64-mingw32/opengl-1.22/glu.so.target' '-shared' '-LX11' 
'-lGLU' '-L/usr/i686-w64-mingw32/lib' '-Wl,-rpath=/usr/i686-w64-mingw32/lib' 
-lchicken -lm -lws2_32

        Error: shell command terminated with nonzero exit code
        256
        "sh /tmp/build/i686-w64-mingw32/opengl-1.22/opengl.build.target.sh 
<http://opengl.build.target.sh>"

        As we can see, the problem here is that GLU is not found.
        I think this is normal for a Windows (32-bit) target because Windows should use "-lopengl32" and 
"-lglu32" instead of "-lGL" and "-lGLU".
        This is what we can see in opengl-1.22/opengl.egg:
        $ cat opengl-1.22/opengl.egg
        ;;; opengl.egg

        ((synopsis "OpenGL bindings")
           (category graphics)
           (license "BSD")
           (dependencies bind silex)
           (author "felix winkelmann")
           (components
             (extension glu
                         (cond-expand
                           (windows
                             (link-options "-lopengl32" "-lglu32"))
                           (macosx
                             (csc-options "-FOpenGL")
                             (link-options "-L" "-framework OpenGL"
                                           "-L" "-framework Foundation"))
                           (openbsd
                             (csc-options "-I/usr/X11R6/include" 
"-I/usr/local/include")
                             (link-options "-L/usr/X11R6/lib" "-L/usr/X11R6/lib"
                                           "-LX11" "-L/usr/local/lib" "-L" 
"-lGLU"))
                           (else
                             (link-options "-LX11" "-L" "-lGLU"))))
             (extension gl
                        (cond-expand
                          (windows
                            (link-options "-lopengl32"))
                          (macosx
                            (csc-options "-FOpenGL")
                            (link-options "-L" "-framework OpenGL"
                                          "-L" "-framework Foundation"))
                          (openbsd
                            (csc-options "-I/usr/X11R6/include" 
"-I/usr/local/include")
                            (link-options "-L/usr/X11R6/lib" "-L/usr/X11R6/lib"
                                          "-LX11" "-L/usr/local/lib" "-L" 
"-lGL"))
                          (else
                            (link-options "-LX11" "-L" "-lGL"))))))

        So, I am stuck here.

        Can you help me please?

        Thank you.
        Best regards.




Reply via email to