Skip to content

Raspberry Pi build error: javac doesn't support the "nativeheaderdir" attribute #1020

Closed

Description

@mc0re
  1. Version of JNA and related jars
    Just fetched from GIT, so 4.5.2+.

  2. Version and vendor of the java virtual machine
    openjdk version "1.8.0_40-internal"
    OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
    OpenJDK Zero VM (build 25.40-b08, interpreted mode)

  3. Operating system
    Linux 4.9.0-6-rpi2 Initial documentation in markdown format. #1 SMP Debian 4.9.82-1+deb9u3+rpi1~jessie (2018-04-12) armv7l GNU/Linux

  4. System architecture (CPU type, bitness of the JVM)
    ARM7

  5. Complete description of the problem
    Fetched the tools, the GIT repository, issued "ant dist" command.

Buildfile: /root/go/src/github.com/jna/jna/build.xml

-prepare-anttools:
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/ant-tools
    [javac] Compiling 3 source files to /root/go/src/github.com/jna/jna/build/ant-tools
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] Note: /root/go/src/github.com/jna/jna/src/com/sun/jna/ELFAnalyser.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 warning

-dynamic-properties:
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/native-linux-arm
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/headers
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/classes
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/test-classes
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/reports
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/doc
    [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/aar
     [echo] Java version 1.8.0_40-internal, compatibility: 1.6, ant: 1.8
     [echo] JNA version 5.0.0-SNAPSHOT, native 6.0.0, android 5000000
     [echo] OpenJDK Zero VM (Oracle Corporation, 25.40-b08)
     [echo] java.home=/usr/lib/jvm/java-8-openjdk-armhf/jre
     [echo] java.library.path=/usr/java/packages/lib/arm:/usr/lib/arm-linux-gnueabihf/jni:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf:/usr/lib/jni:/lib:/usr/lib
     [echo] os.prefix=linux-arm
     [echo] os.name=Linux
     [echo] os.arch=arm (little)
     [echo] build=build
     [echo] build.native=/root/go/src/github.com/jna/jna/build/native-linux-arm
     [echo] build.headers=/root/go/src/github.com/jna/jna/build/headers
     [echo] build.aar=/root/go/src/github.com/jna/jna/build/aar

-setup:

-enable-native:

compile:

BUILD FAILED
/root/go/src/github.com/jna/jna/build.xml:362: javac doesn't support the "nativeheaderdir" attribute

Total time: 31 seconds

Activity

  1. bhamail commented on Oct 4, 2018

    @bhamail
    Contributor

    I run a CI build of JNA on the Raspberry Pi, and all seems well with that build. (jdk 1.8.0_181, ant 1.9.9)

    I suspect your problem may be similar to this: #975 (comment)

    We typically use the GitHub issues tracker for confirmed bugs only. Please use the mailing list to report a problem and first determine if a GitHub issue should be created. See to top of: https://github.com/java-native-access/jna/blob/master/README.md

  2. mc0re commented on Oct 4, 2018

    @mc0re
    Author

    Thanks, you must be right. "apt install" only gets me version 1.9.4, I need 1.9.8+. I wonder how do I get it...

  3. fremontfirstnotlast-netizen commented on Jul 14, 2026

    @fremontfirstnotlast-netizen
    1. Version of JNA and related jars
      Just fetched from GIT, so 4.5.2+.

    2. Version and vendor of the java virtual machine
      openjdk version "1.8.0_40-internal"
      OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
      OpenJDK Zero VM (build 25.40-b08, interpreted mode)

    3. Operating system
      Linux 4.9.0-6-rpi2 Initial documentation in markdown format. #1 SMP Debian 4.9.82-1+deb9u3+rpi1~jessie (2018-04-12) armv7l GNU/Linux

    4. System architecture (CPU type, bitness of the JVM)
      ARM7

    5. Complete description of the problem
      Fetched the tools, the GIT repository, issued "ant dist" command.

    Buildfile: /root/go/src/github.com/jna/jna/build.xml
    
    -prepare-anttools:
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/ant-tools
        [javac] Compiling 3 source files to /root/go/src/github.com/jna/jna/build/ant-tools
        [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
        [javac] Note: /root/go/src/github.com/jna/jna/src/com/sun/jna/ELFAnalyser.java uses unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 1 warning
    
    -dynamic-properties:
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/native-linux-arm
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/headers
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/classes
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/test-classes
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/reports
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/doc
        [mkdir] Created dir: /root/go/src/github.com/jna/jna/build/aar
         [echo] Java version 1.8.0_40-internal, compatibility: 1.6, ant: 1.8
         [echo] JNA version 5.0.0-SNAPSHOT, native 6.0.0, android 5000000
         [echo] OpenJDK Zero VM (Oracle Corporation, 25.40-b08)
         [echo] java.home=/usr/lib/jvm/java-8-openjdk-armhf/jre
         [echo] java.library.path=/usr/java/packages/lib/arm:/usr/lib/arm-linux-gnueabihf/jni:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf:/usr/lib/jni:/lib:/usr/lib
         [echo] os.prefix=linux-arm
         [echo] os.name=Linux
         [echo] os.arch=arm (little)
         [echo] build=build
         [echo] build.native=/root/go/src/github.com/jna/jna/build/native-linux-arm
         [echo] build.headers=/root/go/src/github.com/jna/jna/build/headers
         [echo] build.aar=/root/go/src/github.com/jna/jna/build/aar
    
    -setup:
    
    -enable-native:
    
    compile:
    
    BUILD FAILED
    /root/go/src/github.com/jna/jna/build.xml:362: javac doesn't support the "nativeheaderdir" attribute
    
    Total time: 31 seconds
    

    this.activeConnections

  4. JaredDavis22 commented on Jul 14, 2026

    @JaredDavis22

    Hi,

    [echo] Java version 1.8.0_40-internal, compatibility: 1.6, ant: 1.8

    Looking at past bug reports this may be the solution:

    #975 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions