os icon indicating copy to clipboard operation
os copied to clipboard

falco/0.38.2 package update

Open octo-sts[bot] opened this issue 1 year ago • 3 comments

octo-sts[bot] avatar Aug 19 '24 13:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: 

ERRO ERROR: failed to build package. the build environment has been preserved: INFO workspace dir: /temp/melange-workspace-2790553255 INFO guest dir: /temp/melange-guest-2888924433 ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 1 make[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1 make[1]: Leaving directory '/github/home' make: *** [Makefile:101: package/falco] Error 2


Suggested actions:
1. Check logs in `/temp/melange-workspace-2790553255` and `/temp/melange-guest-2888924433`.
2. Ensure all dependencies are installed.
3. Verify `Makefile` targets and paths.
4. Run `make clean`.
5. Retry the build.
6. Update or patch `falco` if needed.

octo-sts[bot] avatar Aug 19 '24 13:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "fatal: detected dubious ownership in repository at '/github/home'
To add an exception for this directory, call:

git config --global --add safe.directory /github/home
ERRO request failed error=\"Get \\\"./packages/apk-configuration\\\": unsupported protocol scheme \\\"\\\"\" method=GET url=./packages/apk-configuration
ERRO ERROR: failed to build package. the build environment has been preserved:
INFO   workspace dir: /temp/melange-workspace-3527918862
INFO   guest dir: /temp/melange-guest-2260402964
ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 1
make[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1
make[1]: Leaving directory '/github/home'
make: *** [Makefile:101: package/falco] Error 2"

To fix this error:
1. Run `git config --global --add safe.directory /github/home`.
2. Ensure the URL in the GET request uses a supported protocol (e.g., `http://` or `https://`).
3. Verify the build environment and dependencies for the `falco` package.
4. Ensure all required tools and permissions are correctly set up in the build environment.

octo-sts[bot] avatar Aug 19 '24 16:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: 
"ERRO request failed error=\"Get \\\"./packages/apk-configuration\\\": unsupported protocol scheme \\\"\\\"\" method=GET url=./packages/apk-configuration\nERRO ERROR: failed to build package. the build environment has been preserved:\nINFO   workspace dir: /temp/melange-workspace-3321453030\nINFO   guest dir: /temp/melange-guest-221387403\nERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 1\nmake[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1\nmake[1]: Leaving directory '/github/home'\nmake: *** [Makefile:101: package/falco] Error 2\n##[error]Process completed with exit code 2."

To fix this error:
1. Ensure the URL in the GET request is correct and includes a valid protocol (e.g., `http://` or `https://`).
2. Verify the `Makefile` paths and targets are correct.
3. Check the build environment and dependencies.
4. Ensure all required files and directories are present.
5. Re-run the build process.

octo-sts[bot] avatar Aug 19 '24 18:08 octo-sts[bot]

The patch needs to be updated, likely. Looking into it.

srishtih avatar Aug 26 '24 16:08 srishtih

Open AI suggestions to solve the build error:

The error message is: "The imported target 'protobuf::libprotobuf' references the file '/usr/lib/libprotobuf.so.27.4.0' but this file does not exist."

1. Verify if protobuf is installed: `protoc --version`.
2. If not installed, install it: `sudo apt-get install protobuf-compiler libprotobuf-dev`.
3. If installed, locate the correct path: `find /usr -name libprotobuf.so*`.
4. Update the CMakeLists.txt or environment variables to point to the correct path of libprotobuf.

octo-sts[bot] avatar Aug 29 '24 12:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "The imported target 'protobuf::libprotobuf' references the file '/usr/lib/libprotobuf.so.27.4.0' but this file does not exist."

1. Verify if protobuf is installed: `protoc --version`.
2. If not installed, install it: `sudo apt-get install protobuf-compiler libprotobuf-dev`.
3. If installed, locate the correct path: `find /usr -name libprotobuf.so*`.
4. Update the CMakeLists.txt or environment variables to point to the correct path of libprotobuf.

octo-sts[bot] avatar Aug 29 '24 13:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "The imported target 'protobuf::libprotobuf' references the file '/usr/lib/libprotobuf.so.27.4.0' but this file does not exist."

1. Verify if protobuf is installed: `protoc --version`.
2. If not installed, install it: `sudo apt-get install protobuf-compiler libprotobuf-dev`.
3. If installed, locate the correct path: `find /usr -name libprotobuf.so*`.
4. Update the CMakeLists.txt or environment variables to point to the correct path of libprotobuf.

octo-sts[bot] avatar Aug 29 '24 13:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "The imported target 'protobuf::libprotobuf' references the file '/usr/lib/libprotobuf.so.27.4.0' but this file does not exist."

1. Verify if protobuf is installed: `protoc --version`.
2. If not installed, install it: `sudo apt-get install protobuf-compiler libprotobuf-dev`.
3. If installed, locate the correct path: `find /usr -name libprotobuf.so*`.
4. Update the CMakeLists.txt or environment variables to point to the correct path of libprotobuf.

octo-sts[bot] avatar Aug 29 '24 13:08 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "The imported target 'protobuf::libprotobuf' references the file '/usr/lib/libprotobuf.so.27.4.0' but this file does not exist."

1. Verify if protobuf is installed: `protoc --version`.
2. If not installed, install it: `sudo apt-get install protobuf-compiler libprotobuf-dev`.
3. If installed, locate the correct path: `find /usr -name libprotobuf.so*`.
4. Update the CMakeLists.txt or environment variables to point to the correct path.
5. Rebuild the project.

octo-sts[bot] avatar Sep 03 '24 07:09 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is:

WARN /usr/lib/gcc/aarch64-unknown-linux-gnu/14/../../../../aarch64-unknown-linux-gnu/bin/ld: ../engine/libfalco_engine.a(formats.cpp.o): undefined reference to symbol '_ZN4Json5ValueixEPKc' WARN /usr/lib/gcc/aarch64-unknown-linux-gnu/14/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/lib/libjsoncpp.so.26: error adding symbols: DSO missing from command line WARN collect2: error: ld returned 1 exit status WARN make[3]: *** [userspace/falco/CMakeFiles/falco.dir/build.make:315: userspace/falco/falco] Error 1 WARN make[2]: *** [CMakeFiles/Makefile2:1649: userspace/falco/CMakeFiles/falco.dir/all] Error 2 WARN make[1]: *** [CMakeFiles/Makefile2:1656: userspace/falco/CMakeFiles/falco.dir/rule] Error 2 WARN make: *** [Makefile:722: falco] Error 2 ERRO ERROR: failed to build package. the build environment has been preserved: INFO workspace dir: /temp/melange-workspace-1948109124 INFO guest dir: /temp/melange-guest-3924866591 ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 2 make[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1 make[1]: Leaving directory '/github/home' make: *** [Makefile:101: package/falco] Error 2 ##[error]Process completed with exit code 2.


To fix this error:
1. Open the `CMakeLists.txt` file.
2. Locate the target link libraries section for `falco`.
3. Add `jsoncpp` to the list of linked libraries:
   ```cmake
   target_link_libraries(falco jsoncpp)
  1. Save the file and re-run the build process.

octo-sts[bot] avatar Sep 16 '24 11:09 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "ERROR: failed to build package. the build environment has been preserved:
INFO   workspace dir: /temp/melange-workspace-1962351750
INFO   guest dir: /temp/melange-guest-4225367656
ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 2
make[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1
make[1]: Leaving directory '/github/home'
make: *** [Makefile:101: package/falco] Error 2
##[error]Process completed with exit code 2."

1. Check the Makefile at lines 101 and 111 for errors.
2. Ensure all dependencies for building 'falco' are installed.
3. Verify the build environment paths are correct.
4. Run the build command manually to see detailed error output.
5. Check for any missing or incorrect configurations in the build scripts.

octo-sts[bot] avatar Sep 16 '24 11:09 octo-sts[bot]

flips tables

xnox avatar Sep 16 '24 11:09 xnox

Open AI suggestions to solve the build error:

The error message is: "ERROR: failed to build package. the build environment has been preserved:
INFO   workspace dir: /temp/melange-workspace-1515849253
INFO   guest dir: /temp/melange-guest-3586271612
ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 2
make[1]: *** [Makefile:111: packages/x86_64/falco-0.38.2-r0.apk] Error 1
make[1]: Leaving directory '/github/home'
make: *** [Makefile:101: package/falco] Error 2
##[error]Process completed with exit code 2."

1. Verify dependencies are installed.
2. Check for errors in the Makefile at lines 101 and 111.
3. Ensure the build environment is correctly set up.
4. Review the build logs for specific errors.
5. Run `make clean` and retry the build.
6. Update or reinstall the falco package if necessary.

octo-sts[bot] avatar Sep 17 '24 06:09 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "WARN /usr/lib/gcc/aarch64-unknown-linux-gnu/14/../../../../aarch64-unknown-linux-gnu/bin/ld: ../engine/libfalco_engine.a(formats.cpp.o): undefined reference to symbol '_ZN4Json5ValueixEPKc'
WARN /usr/lib/gcc/aarch64-unknown-linux-gnu/14/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/lib/libjsoncpp.so.26: error adding symbols: DSO missing from command line
WARN collect2: error: ld returned 1 exit status
WARN make[3]: *** [userspace/falco/CMakeFiles/falco.dir/build.make:315: userspace/falco/falco] Error 1
WARN make[2]: *** [CMakeFiles/Makefile2:1649: userspace/falco/CMakeFiles/falco.dir/all] Error 2
WARN make[1]: *** [CMakeFiles/Makefile2:1656: userspace/falco/CMakeFiles/falco.dir/rule] Error 2
WARN make: *** [Makefile:722: falco] Error 2
ERRO ERROR: failed to build package. the build environment has been preserved:
INFO   workspace dir: /temp/melange-workspace-468857218
INFO   guest dir: /temp/melange-guest-3280767396
ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 2
make[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1
make[1]: Leaving directory '/github/home'
make: *** [Makefile:101: package/falco] Error 2
##[error]Process completed with exit code 2."

Steps to fix:
1. Open the `CMakeLists.txt` file.
2. Locate the target link libraries section for `falco`.
3. Add `jsoncpp` to the list of linked libraries:
   ```cmake
   target_link_libraries(falco jsoncpp)
  1. Save the file and re-run the build process.

octo-sts[bot] avatar Sep 17 '24 07:09 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is:

WARN /usr/lib/gcc/aarch64-unknown-linux-gnu/14/../../../../aarch64-unknown-linux-gnu/bin/ld: ../engine/libfalco_engine.a(formats.cpp.o): undefined reference to symbol '_ZN4Json5ValueixEPKc' WARN /usr/lib/gcc/aarch64-unknown-linux-gnu/14/../../../../aarch64-unknown-linux-gnu/bin/ld: /usr/lib/libjsoncpp.so.26: error adding symbols: DSO missing from command line WARN collect2: error: ld returned 1 exit status WARN make[3]: *** [userspace/falco/CMakeFiles/falco.dir/build.make:315: userspace/falco/falco] Error 1 WARN make[2]: *** [CMakeFiles/Makefile2:1649: userspace/falco/CMakeFiles/falco.dir/all] Error 2 WARN make[1]: *** [CMakeFiles/Makefile2:1656: userspace/falco/CMakeFiles/falco.dir/rule] Error 2 WARN make: *** [Makefile:722: falco] Error 2 ERRO ERROR: failed to build package. the build environment has been preserved: INFO workspace dir: /temp/melange-workspace-1191945199 INFO guest dir: /temp/melange-guest-2708725637 ERRO failed to build package: unable to run package falco pipeline: unable to run pipeline: unable to run pipeline: exit status 2 make[1]: *** [Makefile:111: packages/aarch64/falco-0.38.2-r0.apk] Error 1 make[1]: Leaving directory '/github/home' make: *** [Makefile:101: package/falco] Error 2 ##[error]Process completed with exit code 2.


To fix this error:
1. Open the `CMakeLists.txt` file.
2. Locate the target link libraries section for `falco`.
3. Add `jsoncpp` to the list of linked libraries:
   ```cmake
   target_link_libraries(falco jsoncpp)
  1. Save the file and re-run the build process.

octo-sts[bot] avatar Sep 17 '24 07:09 octo-sts[bot]

Open AI suggestions to solve the build error:

No errors were found in the last 280 lines of the log file at `/tmp/script83015441`.

octo-sts[bot] avatar Sep 30 '24 12:09 octo-sts[bot]

Open AI suggestions to solve the build error:

The error message is: "In function 'ZSTD_decompressSequences', inlined from 'ZSTD_decompressBlock' at /home/build/lib/legacy/zstd_v01.c:1904:12: /home/build/lib/legacy/zstd_v01.c:1850:35: warning: 'dumpsLength' may be used uninitialized [-Wmaybe-uninitialized] /home/build/lib/legacy/zstd_v01.c:1826:23: note: 'dumpsLength' was declared here /home/build/lib/legacy/zstd_v01.c:1850:35: warning: 'dumps' may be used uninitialized [-Wmaybe-uninitialized] /home/build/lib/legacy/zstd_v01.c:1830:17: note: 'dumps' was declared here /home/build/lib/legacy/zstd_v01.c:1858:83: warning: 'nbSeq' may be used uninitialized [-Wmaybe-uninitialized] /home/build/lib/legacy/zstd_v01.c: In function 'ZSTD_decompressBlock': /home/build/lib/legacy/zstd_v01.c:1829:9: note: 'nbSeq' was declared here"

To fix this error:
1. Initialize `dumpsLength`, `dumps`, and `nbSeq` to default values (e.g., 0 or NULL) at their declaration points.
2. Ensure these variables are properly assigned before use.
3. Add checks to handle cases where these variables might remain uninitialized.

Example:
```c
size_t dumpsLength = 0;
void* dumps = NULL;
size_t nbSeq = 0;

octo-sts[bot] avatar Sep 30 '24 13:09 octo-sts[bot]

Open AI suggestions to solve the build error:

No errors were found in the log file.

octo-sts[bot] avatar Sep 30 '24 14:09 octo-sts[bot]

Latest issue fails only on x86 builds (arm is green yay)...

2024/09/30 14:04:28 WARN /home/build/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libscap/engine/gvisor/parsers.cpp:31:10: fatal error: driver/syscall_compat_x86_64.h: No such file or directory
2024/09/30 14:04:28 WARN    31 | #include <driver/syscall_compat_x86_64.h>
2024/09/30 14:04:28 WARN       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024/09/30 14:04:28 WARN compilation terminated.

It builds locally if I add this to the cmake config options

-DBUILD_FALCO_GVISOR=OFF

But that sounds a bit extreme as the build must have worked before. The original config to build x86 with gvisor was added 2 years ago.

rawlingsj avatar Sep 30 '24 15:09 rawlingsj

Latest issue fails only on x86 builds (arm is green yay)...

2024/09/30 14:04:28 WARN /home/build/build/falcosecurity-libs-repo/falcosecurity-libs-prefix/src/falcosecurity-libs/userspace/libscap/engine/gvisor/parsers.cpp:31:10: fatal error: driver/syscall_compat_x86_64.h: No such file or directory
2024/09/30 14:04:28 WARN    31 | #include <driver/syscall_compat_x86_64.h>
2024/09/30 14:04:28 WARN       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024/09/30 14:04:28 WARN compilation terminated.

It builds locally if I add this to the cmake config options

-DBUILD_FALCO_GVISOR=OFF

But that sounds a bit extreme as the build must have worked before. The original config to build x86 with gvisor was added 2 years ago.

is the build going too fast? and the generated file is not there yet? Can one somehow do "make driver/syscall_compat_x86_64.h" first? or even force the build to be linear?

xnox avatar Sep 30 '24 15:09 xnox

is the build going too fast? and the generated file is not there yet? Can one somehow do "make driver/syscall_compat_x86_64.h" first? or even force the build to be linear?

I don't think so, it seems related to https://github.com/wolfi-dev/os/pull/26622#discussion_r1768820985

rawlingsj avatar Sep 30 '24 16:09 rawlingsj

Open AI suggestions to solve the build error:

No errors were found in the last 280 lines of the log file.

octo-sts[bot] avatar Sep 30 '24 16:09 octo-sts[bot]

superseded by https://github.com/wolfi-dev/os/pull/29778

octo-sts[bot] avatar Oct 01 '24 08:10 octo-sts[bot]