Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
imagen nativa dice "nombre de tipo desconocido 'uint8_t'" durante la compilación

Estoy recibiendo este 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'

Estoy con 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

Parece que el problema está en este código en sys/resource.h :

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

Esta línea con stdint.h no se incluye y es por eso que uint8_t no se define.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Solución posible

Por favor, considere intentar seguir las instrucciones de quarkus/faq.adoc en main · quarkusio/quarkus :

1. Compilación nativa

El ejecutable nativo falla en macOS con error: unknown type name 'uint8_t'

Su macOS tiene los archivos *.h incorrectos en comparación con el sistema operativo y no funcionará la compilación gcc. Esto puede suceder cuando migra desde versiones del sistema operativo. Consulte No se puede compilar ningún programa C++; error: nombre de tipo desconocido 'uint8_t'

La solución es

  • sudo mv /usr/local/include /usr/local/include.old
  • Vuelva a instalar XCode por si acaso
  • (¿opcional?) brew install llvm
  • en general, reinstale sus dependencias de preparación con compilación nativa

El ejecutable debería funcionar ahora.

El propósito de (la idea detrás) cambiar el nombre del directorio de include (de include a include.old ) parece explicarse en la respuesta .

Referencias adicionales

  • Pregunta relacionada. Puede contener algunas soluciones posibles. Bibliotecas estándar c ++ rotas en macOS High Sierra 10.13
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!