home · login to get plonkin'

nix build libstdc++fs.a error

@oppili.bsky.social · 14d ago · plaintext · 11 loc · raw · 1 comment

1       > /nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/bash ../libtool  --tag=CXX   --mode=link /nix/store/hrdlcxlpqhzv2iydcs04n2kdfl1wfsz6-gcc-wrapper-12.4.0/bin/g++ -std=c++17 -I.. -I ../common -I../libcpputils -I../libgixpp -I../build-tools/grammar-tools -Wno-error -Wno-format-security -lstdc++   -o gixpp gixpp-main.o ../libgixpp/libgixpp.a ../libcpputils/libcpputils.a -lstdc++fs2       > libtool: link: /nix/store/hrdlcxlpqhzv2iydcs04n2kdfl1wfsz6-gcc-wrapper-12.4.0/bin/g++ -std=c++17 -I.. -I ../common -I../libcpputils -I../libgixpp -I../build-tools/grammar-tools -Wno-error -Wno-format-security -o gixpp gixpp-main.o  /nix/store/nyjqhrninrh06v6x0ps8q2kpbj9llg12-gcc-12.4.0-lib/lib/../lib64/libstdc++.so -lm ../libgixpp/libgixpp.a ../libcpputils/libcpputils.a /nix/store/nyjqhrninrh06v6x0ps8q2kpbj9llg12-gcc-12.4.0-lib/lib/../lib64/libstdc++fs.a -Wl,-rpath -Wl,/nix/store/nyjqhrninrh06v6x0ps8q2kpbj9llg12-gcc-12.4.0-lib/lib/../lib64 -Wl,-rpath -Wl,/nix/store/nyjqhrninrh06v6x0ps8q2kpbj9llg12-gcc-12.4.0-lib/lib/../lib643       > /nix/store/j7p46r8v9gcpbxx89pbqlh61zhd33gzv-binutils-2.43.1/bin/ld: cannot find /nix/store/nyjqhrninrh06v6x0ps8q2kpbj9llg12-gcc-12.4.0-lib/lib/../lib64/libstdc++fs.a: No such file or directory4       > collect2: error: ld returned 1 exit status5       > make[2]: *** [Makefile:428: gixpp] Error 16       > make[2]: Leaving directory '/build/source/gixpp'7       > make[1]: *** [Makefile:619: all-recursive] Error 18       > make[1]: Leaving directory '/build/source'9       > make: *** [Makefile:487: all] Error 210       For full logs, run 'nix log /nix/store/8naanxnfz0pzdvllv0kqn1n2z1lpxkgy-gixsql-0.1.0.drv'.11

comments

@oppili.bsky.social · 14d ago

{
  description = "GixSQL is an ESQL preprocessor and a series of runtime libraries to enable GnuCOBOL to access PostgreSQL, ODBC, MySQL, Oracle and SQLite databases.";

  inputs = {
    gixsql-src = {
      url = "https://github.com/mridoni/gixsql/releases/download/v1.0.20b/gixsql-1.0.20b.tar.gz";
      flake = false;
    };
  };

  outputs =
    { self
    , nixpkgs
    , gixsql-src
    }:
    let
      supportedSystems = [ "x86_64-linux" ];
      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
      nixpkgsFor = forAllSystems (system: import nixpkgs {
        inherit system;
        overlays = [ self.overlays.default ];
      });
    in
    {
      overlays.default = final: prev: {
        gixsql =
          final.stdenv.mkDerivation {
            pname = "gixsql";
            version = "0.1.0";
            src = gixsql-src;

            buildInputs = [
                final.stdenv.cc
            ];

            nativeBuildInputs = [
                final.bison
                final.flex
                final.pkg-config
                final.autoconf
                final.automake
                final.libtool
                final.gcc12
            ];
            CXXFLAGS = "-Wno-error -Wno-format-security -lstdc++";

            configurePhase = ''
                autoreconf -fi
                automake --add-missing
                CFLAGS=-Wno-error  CXXFLAGS=-Wno-error ./configure --prefix=$out --disable-mysql --disable-odbc --disable-oracle
            '';

            buildPhase = ''
                make CC=${final.gcc12.cc} CXX=${final.gcc12}/bin/g++ CXXFLAGS="$CXXFLAGS"
            '';

            installPhase = ''
                make install
            '';
          };
      };

      packages = forAllSystems (system: {
        inherit (nixpkgsFor."${system}") gixsql;
      });

      defaultPackage = forAllSystems (system: self.packages."${system}".gixsql);
    };
}

login to post a comment