0

I'm trying to build ONOS controller from source code, but at some point of the bazel build process, i get a lot of errors as you can see bellow:

Starting local Bazel server and connecting to it...
... still trying to connect to local Bazel server after 10 seconds ...
INFO: Analyzed target //:onos (1728 packages loaded, 58166 targets configured).
INFO: Found 1 target...
INFO: Deleting stale sandbox base /home/kevin/.cache/bazel/_bazel_root/b80cf3299f3992e280eed8f85033340e/sandbox
ERROR: /home/kevin/onos/BUILD:52:1: Executing genrule //:onos-karaf failed (Exit 2) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
tar: apache-karaf-4.2.9/etc/org.ops4j.pax.logging.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/java.util.logging.properties: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.command.acl.feature.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.shell.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.kar.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/jmx.acl.osgi.compendium.cm.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/distribution.info: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.command.acl.config.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/system.properties: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/jre.properties: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/all.policy: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.command.acl.shell.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/users.properties: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/startup.properties: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/jmx.acl.org.apache.karaf.config.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.command.acl.jaas.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/scripts/shell.completion.script: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/scripts: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/jmx.acl.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/custom.properties: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/profile.cfg: Cannot change ownership to uid 1001, gid 1001: Invalid argument
tar: apache-karaf-4.2.9/etc/org.apache.karaf.features.xml: Cannot change ownership to uid 1001, gid 1001: Invalid argument

That is just a small part, there's hundreds of lines of errors. Still, this specific part "Cannot change ownership to uid 1001, gid 1001: Invalid argument" is displayed in every line.

What can i do to solve this problem?

edit: I tried the solution described here: https://unix.stackexchange.com/questions/548108/cannot-change-ownership-to-uid-1001-gid-1001-invalid-argument but no changes.

Kevin Costa
  • 87
  • 10

1 Answers1

0

try to add --no-same-owner to the script where it is running tar

vim /opt/onos/tools/package/onos-prep-karaf

change line 22 to:

tar xf $KARAF_TAR --no-same-owner

and then run sudo bazel build onos again.

sina
  • 1