Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-4352

Some compilation errors in /net/auth/src/TAFS.cxx

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.32/00
    • Fix Version/s: 5.34/36
    • Component/s: Core Libraries
    • Environment:

      GNU/Linux

      Description

      These look to be errors in the TAFS code, not part of our system
      as far as I can tell, and modifying the code seems to be the only
      way to get the code to compile.

      System is RedHat Enterprise Linux 6.2 (Santiago), running on
      x86_64.

      1) First error encountered was

      g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR_HAVE_CONFIG -pthread -I/usr/afsws/include -DR_AFS -o net/auth/src/TAFS.o -c /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx
      /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx: In constructor 'TAFS::TAFS(const char*, const char*, int)':
      /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx:86:25: error: no matching function for call to 'stat::stat(const char*&, stat*)'
      /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx:86:25: note: candidates are:
      /usr/include/bits/stat.h:46:8: note: stat::stat()
      /usr/include/bits/stat.h:46:8: note: candidate expects 0 arguments, 2 provided
      /usr/include/bits/stat.h:46:8: note: stat::stat(const stat&amp
      /usr/include/bits/stat.h:46:8: note: candidate expects 1 argument, 2 provided
      /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx:140:48: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
      gmake: *** [net/auth/src/TAFS.o] Error 1

      This was resolved by adding includes for
      sys/stat.h and unistd.h to top of TAFS.cxx
      (I'm not sure if unistd needed, but was listed in stat man page)

      2) After that, compilation proceeded further but stopped at:

      g++ -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR_HAVE_CONFIG -pthread -I/usr/afsws/include -DR_AFS -o net/auth/src/TAFS.o -c /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx
      /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx: In constructor 'TAFS::TAFS(const char*, const char*, int)':
      /afs/.glue.umd.edu/project/glue/r/root-cern/5.32.03/.@sys/net/auth/src/TAFS.cxx:143:48: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]

      This appears to be legit to me; Getline returns const char *,
      and pw is only char *. I am about to rewrite to use strncpy
      to get around the const mismatch.

        Attachments

          Activity

            People

            • Assignee:
              ganis Gerardo Ganis
              Reporter:
              none None (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: