NixOS Ruby Development - Installing all needed devkit libraries and headers to build native extensions

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I'm a Ruby developer thoroughly enjoying NixOS. I just need to know how to set up dependencies to build native dependencies on gems like FFI and Nokogiri.



Currently I am getting this error:
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.



More Information



$ cat /home/my_user/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.23/mkmf.log
"pkg-config --exists libffi"
package configuration for libffi is not found
"gcc -o conftest -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/x86_64-linux -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/ruby/backward -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wno-maybe-uninitialized -fPIC conftest.c -L. -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -lruby -lpthread -ldl -lcrypt -lm -lc"
/nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crt1.o: No such file or directory
/nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4:
5: return 0;
6:
/* end */


I get that error after $ nix-env -i libffi







share|improve this question


























    up vote
    1
    down vote

    favorite












    I'm a Ruby developer thoroughly enjoying NixOS. I just need to know how to set up dependencies to build native dependencies on gems like FFI and Nokogiri.



    Currently I am getting this error:
    The compiler failed to generate an executable file. (RuntimeError)
    You have to install development tools first.



    More Information



    $ cat /home/my_user/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.23/mkmf.log
    "pkg-config --exists libffi"
    package configuration for libffi is not found
    "gcc -o conftest -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/x86_64-linux -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/ruby/backward -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wno-maybe-uninitialized -fPIC conftest.c -L. -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -lruby -lpthread -ldl -lcrypt -lm -lc"
    /nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crt1.o: No such file or directory
    /nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crti.o: No such file or directory
    collect2: error: ld returned 1 exit status
    checked program was:
    /* begin */
    1: #include "ruby.h"
    2:
    3: int main(int argc, char **argv)
    4:
    5: return 0;
    6:
    /* end */


    I get that error after $ nix-env -i libffi







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm a Ruby developer thoroughly enjoying NixOS. I just need to know how to set up dependencies to build native dependencies on gems like FFI and Nokogiri.



      Currently I am getting this error:
      The compiler failed to generate an executable file. (RuntimeError)
      You have to install development tools first.



      More Information



      $ cat /home/my_user/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.23/mkmf.log
      "pkg-config --exists libffi"
      package configuration for libffi is not found
      "gcc -o conftest -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/x86_64-linux -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/ruby/backward -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wno-maybe-uninitialized -fPIC conftest.c -L. -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -lruby -lpthread -ldl -lcrypt -lm -lc"
      /nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crt1.o: No such file or directory
      /nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crti.o: No such file or directory
      collect2: error: ld returned 1 exit status
      checked program was:
      /* begin */
      1: #include "ruby.h"
      2:
      3: int main(int argc, char **argv)
      4:
      5: return 0;
      6:
      /* end */


      I get that error after $ nix-env -i libffi







      share|improve this question














      I'm a Ruby developer thoroughly enjoying NixOS. I just need to know how to set up dependencies to build native dependencies on gems like FFI and Nokogiri.



      Currently I am getting this error:
      The compiler failed to generate an executable file. (RuntimeError)
      You have to install development tools first.



      More Information



      $ cat /home/my_user/.gem/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.23/mkmf.log
      "pkg-config --exists libffi"
      package configuration for libffi is not found
      "gcc -o conftest -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/x86_64-linux -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0/ruby/backward -I/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wno-maybe-uninitialized -fPIC conftest.c -L. -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-rpath,/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -L/nix/store/7qn1bgkxn615pqcxi8da72x379ywcf71-ruby-2.3.5/lib -lruby -lpthread -ldl -lcrypt -lm -lc"
      /nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crt1.o: No such file or directory
      /nix/store/3iggy4d1wdwivs4kx9ic90npiwxvnrr8-binutils-2.27/bin/ld: cannot find crti.o: No such file or directory
      collect2: error: ld returned 1 exit status
      checked program was:
      /* begin */
      1: #include "ruby.h"
      2:
      3: int main(int argc, char **argv)
      4:
      5: return 0;
      6:
      /* end */


      I get that error after $ nix-env -i libffi









      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 11 at 13:10

























      asked Apr 11 at 12:50









      David West

      1155




      1155




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I did this and it worked



          $ nix-env -e gcc && nix-env -i clang






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437010%2fnixos-ruby-development-installing-all-needed-devkit-libraries-and-headers-to-b%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            I did this and it worked



            $ nix-env -e gcc && nix-env -i clang






            share|improve this answer
























              up vote
              0
              down vote













              I did this and it worked



              $ nix-env -e gcc && nix-env -i clang






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                I did this and it worked



                $ nix-env -e gcc && nix-env -i clang






                share|improve this answer












                I did this and it worked



                $ nix-env -e gcc && nix-env -i clang







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 11 at 13:21









                David West

                1155




                1155






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f437010%2fnixos-ruby-development-installing-all-needed-devkit-libraries-and-headers-to-b%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Vu3d,mL1QnbL 1MXi lF40llh5xuehXJmBurWa2YfFuYgu
                    o K9t,WpGe,jsX5ALY6rJmgSOQumu9SIBBY2chofIofV1X0o3o0JU49,qUPQht,hC3lEvkM9NVbm9W

                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    How many registers does an x86_64 CPU actually have?

                    Displaying single band from multi-band raster using QGIS