Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set configure options? #41

Open
magick93 opened this issue Sep 3, 2017 · 1 comment
Open

How to set configure options? #41

magick93 opened this issue Sep 3, 2017 · 1 comment

Comments

@magick93
Copy link

magick93 commented Sep 3, 2017

How to force './configure' to use jdk? Is it even possible?

Im not sure how this can happen, but for some reason the jdk is not being detected:

[INFO] checking dynamic linker characteristics... GNU/Linux ld.so
[INFO] checking how to hardcode library paths into programs... immediate
[INFO] checking whether stripping libraries is possible... yes
[INFO] checking if libtool supports shared libraries... yes
[INFO] checking whether to build shared libraries... yes
[INFO] checking whether to build static libraries... no
[INFO] checking how to run the C++ preprocessor... g++ -I/usr/include/wine/windows -E
[INFO] checking for ld used by g++ -I/usr/include/wine/windows... /usr/bin/ld
[INFO] checking if the linker (/usr/bin/ld) is GNU ld... yes
[INFO] checking whether the g++ -I/usr/include/wine/windows linker (/usr/bin/ld) supports shared libraries... yes
[INFO] checking for g++ -I/usr/include/wine/windows option to produce PIC... -fPIC -DPIC
[INFO] checking if g++ -I/usr/include/wine/windows PIC flag -fPIC -DPIC works... yes
[INFO] checking if g++ -I/usr/include/wine/windows static flag -static works... yes
[INFO] checking if g++ -I/usr/include/wine/windows supports -c -o file.o... yes
[INFO] checking if g++ -I/usr/include/wine/windows supports -c -o file.o... (cached) yes
[INFO] checking whether the g++ -I/usr/include/wine/windows linker (/usr/bin/ld) supports shared libraries... yes
[INFO] checking dynamic linker characteristics... (cached) GNU/Linux ld.so
[INFO] checking how to hardcode library paths into programs... immediate
[INFO] configure: javac was on your path, checking to see if it's part of a JDK we can use...
[INFO] checking if '/usr/lib/jvm/java-8-openjdk-amd64' is a JDK... no
[INFO] configure: Taking a guess as to where your OS installs the JDK by default...
[INFO] checking if '/usr' is a JDK... no
[INFO] configure: error: JDK not found. Please use the --with-jni-jdk option

'/usr/lib/jvm/java-8-openjdk-amd64' is present and is most definitely a JDK.

How can I set the '--with-jni-jdk ' option?

@ThinWichael
Copy link

ThinWichael commented Oct 16, 2024

I encounter this kind issue by running mvn install.

I set it in my pom.xml.

I add
--with-jni-jdk=/Users/petterLee/Library/Java/JavaVirtualMachines/corretto-18.0.2/Contents/Home
to below pom.xml

<executions>
              <execution>
                <id>build-native-lib</id>
                <configuration>
                  <name>netty_resolver_dns_native_macos_${os.detected.arch}</name>
                  <nativeSourceDirectory>${nativeSourceDirectory}</nativeSourceDirectory>
                  <libDirectory>${project.build.outputDirectory}</libDirectory>
                  <!-- We use Maven's artifact classifier instead.
                       This hack will make the hawtjni plugin to put the native library
                       under 'META-INF/native' rather than 'META-INF/native/${platform}'. -->
                  <platform>.</platform>
                  <configureArgs>
                    <arg>${jni.compiler.args.ldflags}</arg>
                    <arg>${jni.compiler.args.cflags}</arg>
                    <arg>MACOSX_DEPLOYMENT_TARGET=10.9</arg>
                    <arg>--with-jni-jdk=/Users/petterLee/Library/Java/JavaVirtualMachines/corretto-18.0.2/Contents/Home</arg>
                  </configureArgs>
                </configuration>
                <goals>
                  <goal>generate</goal>
                  <goal>build</goal>
                </goals>
              </execution>
            </executions>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants