Menu

Unable to install 3.1.2 on Mint 20.1

2021-04-28
2021-05-18
  • Robert W.Mills

    Robert W.Mills - 2021-04-28

    Have just upgraded my OS from Mint 18.3 to 20.1 and am reinstalling software. The C compiler and GnuCOBOL versions on 20.1 are the same as I had on 18.3 (which worked fine).

    ./configure says that the C compiler (gcc 9.3.0) cannot create executables (see below):

    [/home/robert/GnuCOBOL/gnucobol-3.1.2]$ ./configure
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking for make... make
    checking whether make supports order-only prerequisites... yes
    checking whether CFLAGS -O can be modified... yes
    checking for gcc... gcc
    checking whether the C compiler works... no
    configure: error: in `/home/robert/GnuCOBOL/gnucobol-3.1.2':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    [/home/robert/GnuCOBOL/gnucobol-3.1.2]$
    

    Have attached config.log (zipped).

     
    • Brian Tiffin

      Brian Tiffin - 2021-04-29

      I'm just poking my head in for no reason, looks like Simon's got you covered, Robert. Eh? Full bumper to bumper? ;-) And...

      Hey, Robert. (spoken all excited like, yelling across a yard at a barbecue). Nice to see Animal.

      Have good,
      Blue

       
    • Nikos

      Nikos - 2021-05-17

      Download the attached deb package

      open Terminal.

      cd to the download folder
      

      install with

      sudo apt install build-essential # to ensure working C compiler/linker
      sudo dpkg -i gnucobol_3.1.2-1_amd64.deb
      sudo apt install -f
      
       

      Last edit: Simon Sobisch 2021-05-18
      • Simon Sobisch

        Simon Sobisch - 2021-05-17

        I don't know, but is it really reasonable to have fdebug-prefix-map with a path of a special home directory reasonable for "general use"? I guess those may be part of the system CFLAGS, in this case you may want to adjust this before the configure.

        Note: That link does not point to a public file, so it cannot be downloaded directly.

         
        • Nikos

          Nikos - 2021-05-17

          I cannot provide a direct link, I attached the deb file in my previous post and I updated the post.
          Thanks

           
          👍
          1
      • Simon Sobisch

        Simon Sobisch - 2021-05-17

        So with this reasonable deb file I think one likely needs either have gnucobol installed from the distro before or manually install the dependencies, correct?

        Do you want to tackle the creation of a deb file which has libxml2-dev and libjsonc-dev installed before configuration (and possibly get rid of the local path in CFLAGS on the way)?

         
        • Nikos

          Nikos - 2021-05-17

          I will make a new deb binary this afternoon with all the missing xml, json, ncurses, ncurcesw, Can you help me how to get rid of local path? I used the attached guide to build the deb.

           

          Last edit: Nikos 2021-05-17
          • Simon Sobisch

            Simon Sobisch - 2021-05-17

            That's an interesting one. to get rid of the local path I'd start do just do echo ---$CFLAGS--- ---$CPPFLAGS--- ---$LDFLAGS--- and check if/where local paths are in.
            I assume the option is found in the first one, in this case you can then:

            ./configure CFLAGS="copy and paste CFLAGS here but without any option that has a local path"

             
            • Nikos

              Nikos - 2021-05-18

              I updated the first post with the new deb package. I tested it with a live-mint (I installed the build essential package first sudo apt install build-essential) environment and works fine.

               
              👍
              1
      • Simon Sobisch

        Simon Sobisch - 2021-05-18

        Congrats to the new deb, I think that will help some people.
        Thinking of this: the CI/CD likely could also provide something like this, can you please drop your updated "recipe" (tarball to .deb)? I should be able to place it into the Ubuntu CI.

        Note: I've mod-edited the build-essential part in (my first guess would have been build-essentials) that you noted below. As I've never used that: what does apt install -f do?

         
        • Nikos

          Nikos - 2021-05-18

          apt install -f fixes , attempts to correct a system with broken dependencies.

          Build the deb.

          1. I followed the recipe mentioned above and made a deb(1) but it doesn't removed the local path but it worked well
          2. I made another deb(2) with the checkinstall, and I removed the local path but this deb didn't issue the ldconfig and I had to issue it hardcoded.
          3. I unpacked both debs and I found that the trigger file was missing from the deb(2)
          4. I copied the trigger file from deb(1) to deb(2) and I repack the deb.

          I used the dpkg-debto unpack - pack debs.

           
  • Simon Sobisch

    Simon Sobisch - 2021-04-28

    When you look at config.log you see the output:

    configure:3653: checking whether the C compiler works
    configure:3675: gcc -O2   conftest.c  >&5
    /usr/bin/ld: cannot find Scrt1.o: No such file or directory
    /usr/bin/ld: cannot find crti.o: No such file or directory
    collect2: error: ld returned 1 exit status
    configure:3679: $? = 1
    configure:3717: result: no
    

    According to stackoverflow this commonly means that you have gcc for a different architecture than you compile for. The commonly recommended sudo apt install gcc-multilibis likely not what you want - something is not setup correct on your environment, I guess you miss the correct (64bit) libraries or ld.

    I suggest, if not done already, to do: sudo apt install build-essentials libgmp-dev libncurses-dev libdb-dev libxml2-dev libjson-c-dev and then try again (if you want to run make check additionally add perl).

     
    • Robert W.Mills

      Robert W.Mills - 2021-05-08

      3.1.2 compiled OK after I installed build-essential (build-essentials doesn't exist) and the other packages.

      Why would I need to install perl?

       
      • Brian Tiffin

        Brian Tiffin - 2021-05-09

        'cause it's good for you, Robert. ;-)

        Part of auto-tools autotest (make check), so that's at least one reason. There may be other scripts in the config/build/test/document/optional-edge-case tool chain.

        But, yeah, perl just be handy to have in your $PATH.

        Have good,
        Blue

         
      • Simon Sobisch

        Simon Sobisch - 2021-05-09

        Concerning GnuCOBOL: only to run 'make test' (the NIST85 testsuite). If you run a development snapshot or a "special" hardware/software to build GnuCOBOL it should be run and pass, but you're on a PC with a standart GNU/Linux distro with a release tarball, so I'd say it is 99.999% pass and id personally not run it.

        Nice to know that your build works. I'm any case I suggest to reach out to the Mint folks asking them for an up-to-date package of GnuCOBOL to ease the next install.

         
  • Rich Di Iulio

    Rich Di Iulio - 2021-05-01

    Robert,

    I have a laptop and a VM running Linux Mint 20.1 (under Windows 10). I am running GnuCOBOL 3.1.2 just fine.

    Rich Di Iulio

     
    • Robert W.Mills

      Robert W.Mills - 2021-05-02

      Hi Rich,

      Could you please send me the following:

      Output from 'gcc --version'.

      A list of the gcc packages marked as installed in Software Manager.

      Lines 1 to the "Output variables." comment block (starts about line 207).

      thanks,
      Robert

      On 02/05/2021 00:38, Rich Di Iulio wrote:

      Robert,

      I have a laptop and a VM running Linux Mint 20.1 (under Windows 10). I
      am running GnuCOBOL 3.1.2 just fine.

      Rich Di Iulio


      Unable to install 3.1.2 on Mint 20.1
      https://sourceforge.net/p/gnucobol/discussion/help/thread/e9aa474f8c/?limit=25#d2aa


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnucobol/discussion/help/
      https://sourceforge.net/p/gnucobol/discussion/help/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions/

       
      • Rich Di Iulio

        Rich Di Iulio - 2021-05-02

        Hi Robert,

        The output from gcc --version

        ==========
        gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
        Copyright (C) 2019 Free Software Foundation, Inc.
        This is free software; see the source for copying conditions. There is NO
        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

        ==========

        I have attached a list of applications I installed before I install GnuCOBOL. i do not understand your other request.

        Rich

         

Anonymous
Anonymous

Add attachments
Cancel