cloudwatt / nixpkgs-tungsten Goto Github PK
View Code? Open in Web Editor NEWTungstenFabric/Opencontrail Nix build
License: MIT License
TungstenFabric/Opencontrail Nix build
License: MIT License
I am trying to installl all contrail in one VM.
analytics modules fails to install with error
/nix/store/kyjic54dlpadpi297gx2slszb79zkir3-contrail-control-5.0/lib/libsandeshvns.a' have the same priority 5;
Logs:
cloud@ocata:~/nixpkgs-tungsten$ ./please install contrail50.vrouterAgent
[please]: Running "nix-env -f default.nix -iA contrail50.vrouterAgent"
installing 'contrail-vrouter-agent-5.0'
building '/nix/store/xb50sc8a38i0z7sd4x9b94r7b3987y0z-user-environment.drv'...
error: packages '/nix/store/r1abm9nl01qjz9rdfpvcbf9dagh9a8kr-contrail-vrouter-agent-5.0/lib/libsandeshvns.a' and '/nix/store/b1wjp1lxpd3407l260hqpfi27787b31w-contrail-query-engine-5.0/lib/libsandeshvns.a' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)
builder for '/nix/store/xb50sc8a38i0z7sd4x9b94r7b3987y0z-user-environment.drv' failed with exit code 1
error: build of '/nix/store/xb50sc8a38i0z7sd4x9b94r7b3987y0z-user-environment.drv' failed
cloud@ocata:~/nixpkgs-tungsten$
With latest code fetch_packages.py
moved to python3.
Tried this patch to use python3:
diff --git a/pkgs/third-party-cache.nix b/pkgs/third-party-cache.nix
index 9c6b7f2..ad82222 100644
--- a/pkgs/third-party-cache.nix
+++ b/pkgs/third-party-cache.nix
@@ -1,4 +1,8 @@
-{ pkgs, contrailSources }:
+{ pkgs
+, lib
+, contrailVersion
diff --git a/pkgs/third-party-cache.nix b/pkgs/third-party-cache.nix
index 9c6b7f2..ad82222 100644
--- a/pkgs/third-party-cache.nix
+++ b/pkgs/third-party-cache.nix
@@ -1,4 +1,8 @@
-{ pkgs, contrailSources }:
+{ pkgs
+, lib
+, contrailVersion
+, contrailSources
+}:
# Hack: we create this derivation to split the downloading from
# the autotool reconfiguration of thrift made by fetch_packages.
@@ -8,7 +12,7 @@
# from nixpkgs).
pkgs.stdenv.mkDerivation {
name = "contrail-third-party-cache";
- version = "3.2";
+ version = contrailVersion;
src = contrailSources.thirdParty;
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
@@ -21,8 +25,8 @@ pkgs.stdenv.mkDerivation {
outputHash = "0000000000000000000000000000000000000000000000000000";
buildInputs = with pkgs; [
- pythonPackages.lxml pkgconfig autoconf automake libtool unzip wget
- ];
+ pkgconfig autoconf automake libtool unzip wget
+ ] ++ (if lib.versionAtLeast50 then [ python3Packages.lxml ] else [ pythonPackages.lxml ]);
buildPhase = "mkdir cache; python fetch_packages.py --cache-dir $PWD/cache";
installPhase = "mkdir $out; cp -ra cache/* $out/";
diff --git a/pkgs/third-party.nix b/pkgs/third-party.nix
index 9957e0f..702b989 100644
--- a/pkgs/third-party.nix
+++ b/pkgs/third-party.nix
@@ -1,4 +1,9 @@
-{ pkgs, contrailVersion, contrailSources, contrailThirdPartyCache }:
+{ pkgs
+, lib
+, contrailVersion
+, contrailSources
+, contrailThirdPartyCache
+}:
pkgs.stdenv.mkDerivation {
name = "contrail-third-party";
@@ -8,8 +13,8 @@ pkgs.stdenv.mkDerivation {
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
But then it failed while building:
these derivations will be built:
/nix/store/6kzgbdnbn06bv9qspcfmyvz9lxrvrkv0-contrail-third-party-cache.drv
/nix/store/v4c7r7apdxw7xf9jb3qay72wmalr84ys-contrail-third-party.drv
building '/nix/store/6kzgbdnbn06bv9qspcfmyvz9lxrvrkv0-contrail-third-party-cache.drv'...
unpacking sources
unpacking source archive /nix/store/dkgpm5p6wgz9lkss1qvqwyx65rihinbl-thirdParty
source root is thirdParty
building
fetch_packages.py:142: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
(distname, version, _) = platform.dist()
Processing Boost C++ libraries version 1.48 ...
Url did not work: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
Url did not work: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
Url did not work: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
Url did not work: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
Url did not work: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
Url did not work: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.gz
Traceback (most recent call last):
File "fetch_packages.py", line 306, in <module>
main()
File "fetch_packages.py", line 279, in main
ProcessPackage(object)
File "fetch_packages.py", line 188, in ProcessPackage
DownloadPackage(urls, ccfile, pkg.find('md5').text)
File "fetch_packages.py", line 122, in DownloadPackage
"downloaded package %s" % (md5sum, md5, pkg))
UnboundLocalError: local variable 'md5sum' referenced before assignment
builder for '/nix/store/6kzgbdnbn06bv9qspcfmyvz9lxrvrkv0-contrail-third-party-cache.drv' failed with exit code 1
cannot build derivation '/nix/store/v4c7r7apdxw7xf9jb3qay72wmalr84ys-contrail-third-party.drv': 1 dependencies couldn't be built
error: build of '/nix/store/v4c7r7apdxw7xf9jb3qay72wmalr84ys-contrail-third-party.drv' failed
We should remove the content of this folder in a postBootCommand
script because we don't support persistence across VMs boot.
$ nix-shell -A contrail32.apiServer
error: attribute 'contrail32' in selection path 'contrail32.apiServer' not found
./please build nix-instantiate: command not found
nix-instantiate: command not found
[please] 'build' requires 1 arguments but 0 were given
Otherwise, the nix installation fails with:
./please init
initialising Nix database...
warning: the group 'nixbld' specified in 'build-users-group' does not exist
warning: the group 'nixbld' specified in 'build-users-group' does not exist
warning: the group 'nixbld' specified in 'build-users-group' does not exist
installing 'nix-2.2.2'
error: the group 'nixbld' specified in 'build-users-group' does not exist
QEMU tests needs kvm
. So, it would be nice to check /dev/kvm
exists and can be used.
It's out so we can build it
I am trying to installl all contrail in one VM.
analytics modules fails to install with error
/nix/store/kyjic54dlpadpi297gx2slszb79zkir3-contrail-control-5.0/lib/libsandeshvns.a' have the same priority 5;
cloud@ocata:~/nixpkgs-tungsten$ ./please install contrail50.vrouterAgent
[please]: Running "nix-env -f default.nix -iA contrail50.vrouterAgent"
installing 'contrail-vrouter-agent-5.0'
building '/nix/store/xb50sc8a38i0z7sd4x9b94r7b3987y0z-user-environment.drv'...
error: packages '/nix/store/r1abm9nl01qjz9rdfpvcbf9dagh9a8kr-contrail-vrouter-agent-5.0/lib/libsandeshvns.a' and '/nix/store/b1wjp1lxpd3407l260hqpfi27787b31w-contrail-query-engine-5.0/lib/libsandeshvns.a' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority)
builder for '/nix/store/xb50sc8a38i0z7sd4x9b94r7b3987y0z-user-environment.drv' failed with exit code 1
error: build of '/nix/store/xb50sc8a38i0z7sd4x9b94r7b3987y0z-user-environment.drv' failed
cloud@ocata:~/nixpkgs-tungsten$
It is possible to use a prebuilt scons cache in a nix-shell to avoid a full recompilaton when working on a contrail component.
See nix-shell default.nix -A contrail50.vrouterAgent.cache
and try to compile the vrouter agent.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.