I am trying to compile from source on centos 7.5, oci8-2.2 but it is giving me a huge failed summary report.
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 33
---------------------------------------------------------------------
Number of tests : 361 354
Tests skipped : 7 ( 1.9%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 342 ( 94.7%) ( 96.6%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 12 ( 3.3%) ( 3.4%)
---------------------------------------------------------------------
Time taken : 29 seconds
=====================================================================
I am not sure if this is normal or if this is meant to show liek this and when i run php locally it does not show oci8 as loaded php -S 0.0.0.0:33080 -t /var/httpd/domain/domain.com/docs -c /opt/SP/php/etc/php.ini
Set valid database connection credentials in oci8/tests/details.inc before you run the tests.
Make sure you have the Oracle Client libraries in your search path. If you are using Oracle Instant Client then using ldconfig would be easiest.
Related
I made a Dockerfile to build my spring boot project with GraalVm natively; everything went correctly.
Here is the Dockerfile
FROM ghcr.io/graalvm/graalvm-ce:22.3.1 AS buildnative
WORKDIR /app
COPY mvnw pom.xml ./
COPY .mvn/ .mvn
COPY src ./src
RUN ./mvnw clean package -Pnative
FROM ubuntu:23.04
EXPOSE 8080
COPY --from=buildnative /app/target/spring-boot-project /build/app
CMD ["/build/app"]
This runs perfectly locally, but in the GitLab runner, I always have the same error.
JAVA_HOME is not defined correctly.
We cannot execute /opt/graalvm-ce-java17-22.3.1/bin/java
The command '/bin/sh -c ./mvnw clean package -Pnative' returned a non-zero code: 1
So I decided to add some logs within the maven wrapper, and here is what I have :
Step 7/11 : RUN ./mvnw clean package -Pnative ---> Running in 81e0558130f3 ------------> /opt/graalvm-ce-java17-22.3.1/bin/java ------------> JAVA_HOME is /opt/graalvm-ce-java17-22.3.1 Error: JAVA_HOME is not defined correctly. We cannot execute /opt/graalvm-ce-java17-22.3.1/bin/java The command '/bin/sh -c ./mvnw clean package -Pnative' returned a non-zero code: 1 Cleaning up project directory and file based variables
Step 7/11 : RUN ./mvnw clean package -Pnative
---> Running in 81e0558130f3
------------> /opt/graalvm-ce-java17-22.3.1/bin/java
------------> JAVA_HOME is /opt/graalvm-ce-java17-22.3.1
Error: JAVA_HOME is not defined correctly.
We cannot execute /opt/graalvm-ce-java17-22.3.1/bin/java
The command '/bin/sh -c ./mvnw clean package -Pnative' returned a non-zero code: 1
Cleaning up project directory and file based variables
In the log I have added, we can see JAVA_HOME is defined and is adequately defined. It is the same as locally, where everything works perfectly.
I tried to add this line: RUN chmod +x mvnw before running it, but it did not change anything.
I need more ideas. Is there anyone have an idea of what is happening?
Edit:
I decided to dive deeper into the issue. I have added logs to know why it does not work. I modified the mvnw script to know what was happening.
I have added this to mvnw
if [ -e "$JAVACMD" ] ; then
echo "------------> THE FILE EXIST" >&2
else
echo "------------> THE FILE DOES NOT EXIST" >&2
fi
if [ -x "$JAVACMD" ] ; then
echo "------------> THE FILE IS EXECUTABLE" >&2
else
echo "------------> THE FILE IS NOT EXECUTABLE" >&2
fi
Results:
Here is in local:
------------> JAVACMD /opt/graalvm-ce-java17-22.3.1/bin/java
------------> THE FILE EXIST
------------> THE FILE IS EXECUTABLE
Here is in the gitlab-runner:
------------> JAVACMD /opt/graalvm-ce-java17-22.3.1/bin/java
------------> THE FILE EXIST
------------> THE FILE IS NOT EXECUTABLE
Makes no sense to me
Is your GitLab runner configured to use a non-root user when executing the Dockerfile?
As #jilliss pointed out, it seems that it's the Java binary that needs execute permission, but maybe only root has the permission (which is why it works locally as by default you will be running it as root).
If the Ops team have tried to run the Dockerfile as another user, then it could explain why /opt/graalvm-ce-java17-22.3.1/bin/java is no longer executable.
Try adding a whoami log and see which user is running when it runs in GL.
Correct compile command is
mvn -Pnative native:compile
You can see more details and full doc here. After that you will see graalvm build result in the logs. So you need to change your docker file like below
FROM ghcr.io/graalvm/graalvm-ce:22.3.1 AS buildnative
WORKDIR /app
COPY mvnw pom.xml ./
COPY .mvn/ .mvn
COPY src ./src
RUN ./mvnw native:compile -Pnative
FROM ubuntu:23.04
EXPOSE 8080
COPY --from=buildnative /app/target/spring-boot-project /build/app
CMD ["/build/app"]
example build log from my local build
[INFO] --- native-maven-plugin:0.9.19:compile (default-cli) # demo ---
Downloading: Component catalog from www.graalvm.org
Processing Component: Native Image
Downloading: Component native-image: Native Image from github.com
Installing new component: Native Image (org.graalvm.native-image, version 22.3.1)
[INFO] Found GraalVM installation from JAVA_HOME variable.
[INFO] [graalvm reachability metadata repository for ch.qos.logback:logback-classic:1.4.5]: Configuration directory not found. Trying latest version.
[INFO] [graalvm reachability metadata repository for ch.qos.logback:logback-classic:1.4.5]: Configuration directory is ch.qos.logback/logback-classic/1.4.1
[INFO] Executing: /opt/graalvm-ce-java17-22.3.1/bin/native-image -cp /app/target/classes:/root/.m2/repository/org/springframework/spring-aop/6.0.4/spring-aop-6.0.4.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter-logging/3.0.2/spring-boot-starter-logging-3.0.2.jar:/root/.m2/repository/org/springframework/spring-context/6.0.4/spring-context-6.0.4.jar:/root/.m2/repository/org/springframework/spring-core/6.0.4/spring-core-6.0.4.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar:/root/.m2/repository/org/springframework/spring-expression/6.0.4/spring-expression-6.0.4.jar:/root/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.19.0/log4j-to-slf4j-2.19.0.jar:/root/.m2/repository/ch/qos/logback/logback-core/1.4.5/logback-core-1.4.5.jar:/root/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar:/root/.m2/repository/org/springframework/spring-beans/6.0.4/spring-beans-6.0.4.jar:/root/.m2/repository/ch/qos/logback/logback-classic/1.4.5/logback-classic-1.4.5.jar:/root/.m2/repository/org/springframework/boot/spring-boot-starter/3.0.2/spring-boot-starter-3.0.2.jar:/root/.m2/repository/org/springframework/spring-jcl/6.0.4/spring-jcl-6.0.4.jar:/root/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.0.2/spring-boot-autoconfigure-3.0.2.jar:/root/.m2/repository/org/slf4j/jul-to-slf4j/2.0.6/jul-to-slf4j-2.0.6.jar:/root/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar:/root/.m2/repository/org/springframework/boot/spring-boot/3.0.2/spring-boot-3.0.2.jar:/root/.m2/repository/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.jar --no-fallback -H:Path=/app/target -H:Name=demo -H:ConfigurationFileDirectories=/app/target/graalvm-reachability-metadata/160481799c4b6c37cde925c9aebf513c32245dcf/ch.qos.logback/logback-classic/1.4.1
========================================================================================================================
GraalVM Native Image: Generating 'demo' (executable)...
========================================================================================================================
[1/7] Initializing... (6.6s # 0.23GB)
Version info: 'GraalVM 22.3.1 Java 17 CE'
Java version info: '17.0.6+10-jvmci-22.3-b13'
C compiler: gcc (redhat, x86_64, 11.3.1)
Garbage collector: Serial GC
1 user-specific feature(s)
- org.springframework.aot.nativex.feature.PreComputeFieldFeature
Field org.apache.commons.logging.LogAdapter#log4jSpiPresent set to true at build time
Field org.apache.commons.logging.LogAdapter#log4jSlf4jProviderPresent set to true at build time
Field org.apache.commons.logging.LogAdapter#slf4jSpiPresent set to true at build time
Field org.apache.commons.logging.LogAdapter#slf4jApiPresent set to true at build time
Field org.springframework.core.NativeDetector#imageCode set to true at build time
Field org.springframework.format.support.DefaultFormattingConversionService#jsr354Present set to false at build time
Field org.springframework.core.KotlinDetector#kotlinPresent set to false at build time
Field org.springframework.core.KotlinDetector#kotlinReflectPresent set to false at build time
Field org.springframework.cglib.core.AbstractClassGenerator#imageCode set to true at build time
Field org.springframework.boot.logging.log4j2.Log4J2LoggingSystem$Factory#PRESENT set to false at build time
Field org.springframework.boot.logging.java.JavaLoggingSystem$Factory#PRESENT set to true at build time
Field org.springframework.boot.logging.logback.LogbackLoggingSystem$Factory#PRESENT set to true at build time
Field org.springframework.boot.logging.logback.LogbackLoggingSystemProperties#JBOSS_LOGGING_PRESENT set to false at build time
Field org.springframework.context.event.ApplicationListenerMethodAdapter#reactiveStreamsPresent set to false at build time
[2/7] Performing analysis... [*******] (60.8s # 2.15GB)
8,903 (88.31%) of 10,082 classes reachable
13,147 (64.27%) of 20,456 fields reachable
40,485 (56.88%) of 71,181 methods reachable
365 classes, 115 fields, and 1,191 methods registered for reflection
64 classes, 70 fields, and 55 methods registered for JNI access
4 native libraries: dl, pthread, rt, z
[3/7] Building universe... (8.9s # 2.03GB)
[4/7] Parsing methods... [***] (9.6s # 0.82GB)
[5/7] Inlining methods... [***] (3.7s # 2.16GB)
[6/7] Compiling methods... [*******] (48.2s # 1.97GB)
[7/7] Creating image... (5.6s # 1.60GB)
17.53MB (49.48%) for code area: 25,460 compilation units
17.60MB (49.66%) for image heap: 215,829 objects and 25 resources
312.40KB ( 0.86%) for other data
35.44MB in total
------------------------------------------------------------------------------------------------------------------------
Top 10 packages in code area: Top 10 object types in image heap:
936.87KB java.util 3.72MB byte[] for code metadata
594.27KB java.lang.invoke 2.07MB java.lang.String
469.21KB c.s.org.apache.xerces.internal.impl.xs.traversers 2.06MB java.lang.Class
455.78KB java.lang 1.68MB byte[] for general heap data
423.05KB com.sun.org.apache.xerces.internal.impl 1.60MB byte[] for java.lang.String
407.79KB com.sun.crypto.provider 765.10KB com.oracle.svm.core.hub.DynamicHubCompanion
375.00KB org.springframework.beans.factory.support 576.38KB java.util.HashMap$Node
371.71KB java.io 513.09KB int[][]
354.25KB java.util.concurrent 394.88KB java.lang.String[]
328.57KB java.text 394.65KB byte[] for reflection metadata
12.74MB for 405 more packages 3.23MB for 1771 more object types
------------------------------------------------------------------------------------------------------------------------
12.0s (8.0% of total time) in 35 GCs | Peak RSS: 3.04GB | CPU load: 5.08
------------------------------------------------------------------------------------------------------------------------
Produced artifacts:
/app/target/demo (executable)
/app/target/demo.build_artifacts.txt (txt)
========================================================================================================================
Finished generating 'demo' in 2m 29s.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:11 min
[INFO] Finished at: 2023-01-27T18:05:23Z
[INFO] ------------------------------------------------------------------------
Never tried gitlab runner myself, but have you tried to force the JAVA_HOME env path before maven command?
ENV JAVA_HOME=/opt/graalvm-ce-java17-22.3.1
RUN ./mvnw clean package -Pnative
hope it helps
I am working on a small Golang monorepo and I am using Bazel + gazelle to manage deps along with tests, builds, coverage,...
I am having an issue when it comes to coverage. I have followed a few examples but for some reason the coverage_report.dat file (that then will be processed by genhtml) is always empty.
This is the command that I am running with relative output
$ bazel coverage --combined_report=lcov --cache_test_results=no --test_output=all //...
INFO: Using default value for --instrumentation_filter: "^//service/hello[/:],^//service/hellotwo[/:]".
INFO: Override the above default with --instrumentation_filter
INFO: Analyzed 4 targets (0 packages loaded, 0 targets configured).
INFO: Found 2 targets and 2 test targets...
INFO: From Testing //service/hello:hello_test:
==================== Test output for //service/hello:hello_test:
PASS
coverage: 100.0% of statements
================================================================================
INFO: From Testing //service/hellotwo:hellotwo_test:
==================== Test output for //service/hellotwo:hellotwo_test:
PASS
coverage: 100.0% of statements
================================================================================
INFO: LCOV coverage report is located at /private/var/tmp/_bazel_andrea/292e77b095155ea362773b482c2c4621/execroot/__main__/bazel-out/_coverage/_coverage_report.dat
and execpath is bazel-out/_coverage/_coverage_report.dat
INFO: Elapsed time: 0.217s, Critical Path: 0.09s
INFO: 3 processes: 1 internal, 2 darwin-sandbox.
INFO: Build completed successfully, 3 total actions
//service/hello:hello_test PASSED in 0.1s
/private/var/tmp/_bazel_andrea/292e77b095155ea362773b482c2c4621/execroot/__main__/bazel-out/darwin-fastbuild/testlogs/service/hello/hello_test/coverage.dat
//service/hellotwo:hellotwo_test PASSED in 0.1s
/private/var/tmp/_bazel_andrea/292e77b095155ea362773b482c2c4621/execroot/__main__/bazel-out/darwin-fastbuild/testlogs/service/hellotwo/hellotwo_test/coverage.dat
Executed 2 out of 2 tests: 2 tests pass.
INFO: Build completed successfully, 3 total actions
The coverage is calculated but bazel-out/_coverage/_coverage_report.dat is empty. I was wondering if anyone has had this issue before and managed to find a solution to it.
I am working on a MacBook Pro with Bazel (v4.1.0) installed via Homebrew.
When installing APEX, I get the following error from Phase II of the installation procedure. I have no idea why: Many thanks for any hints
ok 1 - BEGIN | 0.00
ok 2 - Upgrade Metadata (1) | 0.00
ok 3 - Init Phase PRE | 0.03
ok 4 - Dropping Upgrade Triggers in FLOWS_020100 | 0.00
ok 5 - Creating Upgrade Triggers | 0.00
ok 6 - Incrementing Session Sequence | 0.00
ok 7 - Disabling Constraints/Triggers | 0.02
ok 8 - Copying WWV_FLOWS | 0.07
# copied 2 rows into WWV_FLOWS
ok 9 - Rebuilding WWV_FLOWS_IDX_AUTHENTICATION | 0.00
not ok 10 - Copying WWV_FLOW_BANNER | 0.00
# Message: ORA-06550: line 6, column 14:
# PL/SQL: ORA-00932: inconsistent datatypes: expected CLOB got LONG
# Statement: begin
# insert /+append/ into "APEX_200100"."WWV_FLOW_BANNER"
# ( ID,
# BANNER,
# SECURITY_GROUP_ID)
# select ID, BANNER, SECURITY_GROUP_ID
# from "FLOWS_020100"."WWV_FLOW_BANNER" bt1
# where security_group_id not in (10, 12) order by SECURITY_GROUP_ID ;
# wwv_flow_upgrade.g_row_cnt := sql%rowcount;
# end;
it appears that the 19.3 database already contained a super-old APEX version (HTML DB 2.1). When the APEX installation detects an existing APEX version, it attempts an upgrade.
And in the meantime (HTML DB 2.1) is about 15 years old, there were some major changes which break this large upgrade jump from 2.1 to 20.1.
The most important question is ...
Is that existing HTML DB 2.1 installation in use or not? If not, simply drop the FLOWS_020100, FLOWS_FILES and FLOWS_PUBLIC_USER database users and re-attempt the installation.
i have tried:
in menu start: CPAN Client
install Alien::SDL SDL
i choose 64 bit and after a long while errors:
what is wrong? it seems simple, but it's not
so i tried: cpan -i --force SDL
no errors, but i can't run Padre anymore :/
i try perl name.pl (with sdl code program) and it gives:
in 'cmd' in Windows 7: cpan -i SDL and it gives me (last part):
<pre>
t\sdlx_controller_interface.t ... ok
t\sdlx_fps.t .................... ok
t\sdlx_layermanager.t ........... ok
t\sdlx_music.t .................. ok
t\sdlx_rect.t ................... ok
t\sdlx_sfont.t .................. ok
t\sdlx_sound.t .................. ok
t\sdlx_sprite.t ................. ok
t\sdlx_sprite_animated.t ........ ok
t\sdlx_surface.t ................ ok
t\sdlx_text.t ................... ok
t\sdlx_validate.t ............... ok
t\smpeg.t ....................... skipped: smpeg support not compiled
t\ttf.t ......................... ok
t\ttf_font.t .................... ok
Test Summary Report
-------------------
t\core.t (Wstat: 0 Tests: 28 Failed: 0)
TODO passed: 21-22
t\core_video.t (Wstat: 768 Tests: 71 Failed: 0)
TODO passed: 57, 59
Non-zero exit status: 3
Parse errors: No plan found in TAP output
Files=59, Tests=3788, 188 wallclock secs ( 0.56 usr + 0.08 sys = 0.64 CPU)
Result: FAIL
Failed 1/59 test programs. 0/3788 subtests failed.
FROGGS/SDL-2.546.tar.gz
E:\_win_7\Dwimperl\perl\bin\perl.exe ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports FROGGS/SDL-2.546.tar.gz
Running Build install
make test had returned bad status, won't install without force
So... i have tried "cpan -i SDL --force"
gives:
Test Summary Report
-------------------
t\core.t (Wstat: 0 Tests: 28 Failed: 0)
TODO passed: 21-22
t\core_video.t (Wstat: 768 Tests: 71 Failed: 0)
TODO passed: 57, 59
Non-zero exit status: 3
Parse errors: No plan found in TAP output
Files=59, Tests=3788, 147 wallclock secs ( 0.47 usr + 0.13 sys = 0.59 CPU)
Result: FAIL
Failed 1/59 test programs. 0/3788 subtests failed.
FROGGS/SDL-2.546.tar.gz
E:\_win_7\Dwimperl\perl\bin\perl.exe ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports FROGGS/SDL-2.546.tar.gz
Running Build install
make test had returned bad status, won't install without force
Warning: Cannot install --force, don't know what it is.
Try the command
i /--force/
to find objects with matching identifiers.
So I tried:
cpan -i --force SDL
No errors, but I can't run Padre anymore. I tried
perl name.pl
(with sdl code program) and it gives:
i run pex by command line on a class of about 2200 methods.
After 2 days of elaboration, I think to have the test suite and report html, pex finished this morning at 8.05 AM and the list file modified is at 08.40 AM.
The last line of output are :
08:05:08.3> [finished] execution time 2.08:05:08.3014942.
-- 0 critical errors, 0 errors, 0 warnings.
-- 83635 generated tests, 1 failing, 83635 new, 0 inconclusive.
[coverage] generating coverage reports...
[reports] generating reports...
[reports] report path: reports\121005.001302.3848.pex
The process pex.exe is running continuos, But what is happened ? After about 3.5 hours ( now for me is 12.15 pm ) its maybe is going to loop or what is the operation is it doing ?
CPU is full and memory too ( process pex 1.5G of RAM)
Do you think I have to stop it?
Thanks best regards.
After 2 days and about 14h I stop the process :
[coverage] generating coverage reports...
[reports] generating reports...
[reports] report path: reports\121005.001302.3848.pex
!error! [reports] rendering of coverage reports failed: exit code 1 - 0x1
Microsoft Pex v0.94.51023.0 -- http://research.microsoft.com/pex -- v4.0.30319
Copyright (c) Microsoft Corporation 2007-2010. All rights reserved.
[tests] could not resolve test framework, using default (Visual Studio Unit Test
)
[reports] html report: reports\121005.001302.3848.pex\report.html
LAUNCHER FAILED
unexpected failure: exit code 1 - 0x1
Maybe I have few resource ( 2G RAM and a dual core ) and pex doesn't do the report.html