System.Teminal.hsc fails to compile on a Solaris-family OS
@Bodigrim ya está trabajando en esto.
Desde el 28/9/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
This has been reported at https://www.reddit.com/r/haskell/comments/1nrt23b/comment/ngka3xp/ as a failure to a build Stack itself:
<command-line>: note: this is the location of the previous definition
In file included from /root/stack-3.7.1/dist-newstyle/build/x86_64-solaris/ghc-9.8.2/stack-3.7.1/build/System/Terminal_hsc_make.c:1:
Terminal.hsc: In function 'main':
Terminal.hsc:28:15: error: invalid application of 'sizeof' to incomplete type 'struct winsize'
/opt/local/lib/ghc-9.8.2/lib/template-hsc.h:96:39: note: in definition of macro 'hsc_size'
96 | hsc_printf("(%ld)", (long) sizeof(t));
| ^
/opt/local/lib/ghc-9.8.2/lib/template-hsc.h:102:9: error: field 'b' has incomplete type
102 | x b; \
| ^
Terminal.hsc:29:5: note: in expansion of macro 'hsc_alignment'
In file included from /opt/local/lib/ghc-9.8.2/lib/template-hsc.h:11:
/opt/local/lib/ghc-9.8.2/lib/template-hsc.h:82:24: error: invalid use of undefined type 'struct winsize'
82 | (long) offsetof (t, f));
|
This seemingly stems from
https://github.com/commercialhaskell/stack/blob/b2457a8f147c228bd2aba9c00cb16e3c28cd0a3a/src/unix/System/Terminal.hsc#L27-L32
I have no idea what's going on. Looking at a similar functionality in https://github.com/biegunka/terminal-size/blob/master/src/System/Console/Terminal/Posix.hsc, I notice a suspicious line
#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
which might or might not have to do something with the latter error.
BTW is there a reason stack does not use terminal-size to get the terminal width and rolls out its own implementation?
- Lenguaje dominante
- Haskell
- Estrellas
- 4.1k
- Forks
- 857
- Merge medio
- 17 h 32 min
- PR fusionados (30 d)
- 5
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de commercialhaskell/stack
-
Build Stack against Cabal >= 3.18Posiblemente ocupada @mpilgrem la tomó hace 14 días. Abierto
commercialhaskell/stack#6976 · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
commercialhaskell/stack#6954 ·
-
Support type-checking without compilingQuizá libre de nuevo @mpilgrem la tomó hace 135 días y no hay ningún pull request abierto. Abiertocomponent: build type: enhancement
commercialhaskell/stack#6951 · 3 reacciones · 1 asignado ·
-
Support semaphore-compat 2.0.0Quizá libre de nuevo @mpilgrem la tomó hace 158 días y no hay ningún pull request abierto. Abiertocomponent: build in progress type: enhancement
commercialhaskell/stack#6934 · 3 comentarios · 1 asignado ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
commercialhaskell/stack#6864 · 1 comentario ·
Todos los issues de commercialhaskell/stack
Issues similares
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
alunduil/network-arbitrary#293 ·
Los mantenedores suelen responder en 1 día
-
area:client bug priority-low
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 91/100
simplex-chat/simplex-chat#8372 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9710 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
agda/agda#8965 · 1 comentario ·
Los mantenedores suelen responder en 1 día