Results 1 to 7 of 7

Thread: compiling error: "touch: cannot touch ..."

  1. #1
    Join Date
    Aug 2008
    Location
    Baltimore
    Beans
    44
    Distro
    Kubuntu 12.04 Precise Pangolin

    compiling error: "touch: cannot touch ..."

    Hey everybody,

    I'm trying to compile a program but I'm getting an error that's driving me bonkers. I've posted the entire output from make, but the part with the error is here:

    Code:
    touch: cannot touch `/home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/exe/obj.last': No such file or directory
    make: *** [/home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/exe/obj.last] Error 1
    The idea is that I'm using a toolkit called Geant4 to write a program that does some particle physics simulation. My program needs to have the proper environment to access the Geant4 libraries, as well as some other libraries. Could this be the source of the problem?

    Thanks for your help,

    jondiced (who is becoming quite actually jaundiced by this problem!)

    Code:
    Making dependency for file src/Setup.cc ...
    Making dependency for file src/PrimaryGeneratorMessenger.cc ...
    Making dependency for file src/PrimaryGeneratorAction.cc ...
    Making dependency for file src/PhysicsListFactory.cc ...
    Making dependency for file src/ParticleGunMessenger.cc ...
    Making dependency for file src/ParticleGunGenerator.cc ...
    Making dependency for file src/LCSensitiveDetector.cc ...
    Making dependency for file src/LCRunAction.cc ...
    Making dependency for file src/LCRootOut.cc ...
    Making dependency for file src/LCPhysicsList.cc ...
    Making dependency for file src/LCLeptonPhysics.cc ...
    Making dependency for file src/LCIonPhysics.cc ...
    Making dependency for file src/LCHit.cc ...
    Making dependency for file src/LCHadronPhysics.cc ...
    Making dependency for file src/LCFieldX14.cc ...
    Making dependency for file src/LCField.cc ...
    Making dependency for file src/LCEventAction.cc ...
    Making dependency for file src/LCDetectorConstruction.cc ...
    Making dependency for file src/LCDecayPhysics.cc ...
    Making dependency for file src/LCBosonPhysics.cc ...
    Making dependency for file src/InputFileGenerator.cc ...
    Making dependency for file src/HEPEvtInterface.cc ...
    Compiling HEPEvtInterface.cc ...
    Compiling InputFileGenerator.cc ...
    Compiling LCBosonPhysics.cc ...
    Compiling LCDecayPhysics.cc ...
    Compiling LCDetectorConstruction.cc ...
    Compiling LCEventAction.cc ...
    Compiling LCField.cc ...
    Compiling LCFieldX14.cc ...
    Compiling LCHadronPhysics.cc ...
    Compiling LCHit.cc ...
    Compiling LCIonPhysics.cc ...
    Compiling LCLeptonPhysics.cc ...
    Compiling LCPhysicsList.cc ...
    Compiling LCRootOut.cc ...
    Compiling LCRunAction.cc ...
    Compiling LCSensitiveDetector.cc ...
    Compiling ParticleGunGenerator.cc ...
    Compiling ParticleGunMessenger.cc ...
    Compiling PhysicsListFactory.cc ...
    /opt/g4/9.1/include/QBBC.icc:61: warning: unused parameter 'gl'
    Compiling PrimaryGeneratorAction.cc ...
    Compiling PrimaryGeneratorMessenger.cc ...
    Compiling Setup.cc ...
    Creating/replacing object files in /home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/libLcal-pro.a ...
    ar: creating /home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/libLcal-pro.a
    touch: cannot touch `/home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/exe/obj.last': No such file or directory
    make: *** [/home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/exe/obj.last] Error 1

  2. #2
    Join Date
    May 2007
    Location
    Santiago, Chile
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: compiling error: "touch: cannot touch ..."

    Does the
    Code:
    /home/aguilar/geant4/LumiCal-pro/tmp/Linux-g++/Lcal-pro/exe/
    directory exist? Do you have permission to write on it?

  3. #3
    Join Date
    Apr 2009
    Location
    Germany
    Beans
    2,134
    Distro
    Ubuntu Development Release

    Re: compiling error: "touch: cannot touch ..."

    I once had a similar problem when compiling root.
    It couldn't touch a file although the directory existed and permissions where ok.
    I just touched the file by hand and it worked with no problems.
    no idea what caused it.

  4. #4
    Join Date
    Aug 2008
    Location
    Baltimore
    Beans
    44
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: compiling error: "touch: cannot touch ..."

    Permissions are OK. The directory doesn't exist but make should create it. When I try making the directory and file by hand, I get an "undefined reference to main" error:

    Code:
    Using granular libraries ...
    Linking Lcal-pro ...
    /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crt1.o(.text+0x18): In function `_start':
    : undefined reference to `main'
    collect2: ld returned 1 exit status
    make: *** [/home/aguilar/ilcsoft/v01-06/Mokka/mokka-06-07-patch02/bin/Linux-g++/Lcal-pro] Error 1
    Unfortunately, Googling for the error just returns thousands of people's unrelated errors where "touch: cannot touch" happens to turn up!

  5. #5
    Join Date
    Aug 2008
    Location
    Baltimore
    Beans
    44
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: compiling error: "touch: cannot touch ..."

    Problem solved! Solution here, which I can't believe I didn't find earlier: http://hypernews.slac.stanford.edu/H...html?inline=-1

    Anyway, the following 3 items must be the same:
    1. Executable name in the makefile
    2. Directory name
    3. Foo.cc (replace "Foo" with executable name)

    Thanks for your suggestions. Hope this helps anyone else in the future.

  6. #6
    Join Date
    Apr 2008
    Beans
    10

    Re: compiling error: "touch: cannot touch ..."

    OMG that is sooooo frustrating. It took me like half an hour of debugging to find the difference between Nozzel01 and Nozzle01. Thanks though .

  7. #7
    Join Date
    Mar 2007
    Location
    Liverpool
    Beans
    152

    Re: compiling error: "touch: cannot touch ..."

    Cheers!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •