Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
native-image says "unknown type name 'uint8_t'" during compilation

I'm getting this error:

$ native-image -jar foo.jar bin/java-Objects.bin
...
[bin/java-Objects.bin:24855]    classlist:   1,143.29 ms,  0.96 GB
[bin/java-Objects.bin:24855]        (cap):   1,803.60 ms,  0.96 GB
[bin/java-Objects.bin:24855]        setup:   2,304.75 ms,  0.96 GB
Error: Error compiling query code (in /var/folders/vl/633jwjvn2jvbj9zfg1sgglhw0000gp/T/SVM-3396448792019069231/PosixDirectives.c). Compiler command '/usr/bin/cc -Wall -Werror -ObjC -o /var/folders/vl/633jwjvn2jvbj9zfg1sgglhw0000gp/T/SVM-3396448792019069231/PosixDirectives /var/folders/vl/633jwjvn2jvbj9zfg1sgglhw0000gp/T/SVM-3396448792019069231/PosixDirectives.c' output included error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/sys/resource.h:202:2:
error: unknown type name 'uint8_t'

I'm with Clang:

$ clang --version
Homebrew clang version 13.0.0
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

It seems that the problem is with this code in sys/resource.h:

#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
#include <stdint.h>
#endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */

This line with stdint.h doesn't get included and that's why uint8_t doesn't get defined.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Possible solution

Please, consider trying to follow the instruction from quarkus/faq.adoc at main · quarkusio/quarkus:

1. Native compilation

Native executable fails on macOS with error: unknown type name 'uint8_t'

Your macOS has the wrong *.h files compared to the OS and no gcc compilation will work. This can happen when you migrate from versions of the OS. See Cannot compile any C++ programs; error: unknown type name 'uint8_t'

The solution is to

  • sudo mv /usr/local/include /usr/local/include.old
  • Reinstall XCode for good measure
  • (optional?) brew install llvm
  • generally reinstall your brew dependencies with native compilation

The executable should work now.

The purpose of (the idea behind) renaming the include directory (from include to include.old) seems to be explained in the answer.

Additional references

  • Related question. May contain some possible solutions. Broken c++ std libraries on macOS High Sierra 10.13 - Stack Overflow.
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda