Giter Club home page Giter Club logo

Comments (1)

joelhacker avatar joelhacker commented on June 3, 2024

Given that we were trying to build DSC on a newer platform (rocky8), we decided to try to build DSC from source.

We followed the following guide,

https://github.com/microsoft/PowerShell-DSC-for-Linux

and performed the following steps:

  1. Install the RPM repos that are used for the installation

    a. We Install the dnf-plugins support and enable the EPEL repo.
    (Which is the fedora build of Extra Packages for Enterprise Linux)
    NOTE: wget and tar are included to support Visual Studio code
    /usr/bin/dnf -y install dnf-plugins-core epel-release wget tar

  2. Enable the Powertools and Development Tools and install the pre-requisite rpms.

/usr/bin/dnf config-manager --set-enabled powertools
/usr/bin/dnf -y groupinstall 'Development Tools'
/usr/bin/dnf -y install pam-devel openssl-devel python39 python39-devel libicu gssntlmssp unzip mlocate gcc-c++ make redhat-lsb-core
ln -s /usr/bin/python3 /usr/bin/python

  1. Disable selinux

sed -i s/SELINUX=enforcing/SELINUX=permissive/ /etc/sysconfig/selinux
setenforce permissive

  1. Install the powershell.

wget https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/powershell-7.1.4-1.centos.8.x86_64.rpm
rpm -Uvh *.rpm && rm *.rpm

We then performed the following steps from the following online build steps:

(https://github.com/microsoft/PowerShell-DSC-for-Linux#building-and-using-dsc-and-omi-from-source)
Starting at building and using dsc and omi from source (see link above), we ran the following steps

  1. git clone the DSC source

git clone https://github.com/Microsoft/PowerShell-DSC-for-Linux.git
cd PowerShell-DSC-for-Linux

  1. Place the OMI source where DSC expects it alternatively clone from Git and symlink to omi/Unix
    wget https://github.com/microsoft/omi/archive/refs/tags/v1.6.8-1.tar.gz
    tar xzf v1.6.8-1.tar.gz

  2. Build OMI in developer mode
    cd omi-1.6.8-1/Unix/
    ./configure --dev
    make -j

After running the make, we get the following errors in our build:


injector.cpp: In function ‘long unsigned int InjectorSetup()’:
injector.cpp:468:70: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class TestSystem::Globals’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
memcpy(g_globals, &g_tempGlobals, sizeof(TestSystem::Globals));
^
In file included from injector.cpp:10:
../../nits/base/Globals.h:230:7: note: ‘class TestSystem::Globals’ declared here
class Globals
^~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [../../mak/rules.mak:486: /root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/output/obj/nits/injector/injector.o] Error 1
make[3]: Leaving directory '/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/nits/injector'
make[2]: *** [../mak/rules.mak:421: all] Error 2
make[2]: Leaving directory '/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/nits'
make[1]: *** [/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix/mak/rules.mak:421: all] Error 2
make[1]: Leaving directory '/root/dsc_source/PowerShell-DSC-for-Linux/omi-1.6.8-1/Unix'
make: *** [GNUmakefile:38: all] Error 2

from powershell-dsc-for-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.