Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#154 cofs and cmake

v0.7.x (release)
closed-works-for-me
Henry N.
5
2009-05-20
2009-04-09
MerseyViking
No

I'm using andLinux to do some cross-platform development using cmake (version 2.4-patch 7) as the makefile generator. If I have a cofs mount pointing to my Windows drive, cmake falls over when trying to compile a simple test app. If the same directory is mounted as a SMB share, it works fine.

The error I get from cmake is:
$ cmake . -G"Unix Makefiles"
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error: The C compiler "/usr/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
make: *** Makefile: No such file or directory. Stop.

CMake will not be able to correctly generate this project.
-- Configuring done

I appreciate this may be an issue with cmake, such as it creating funky filenames that cofs can't deal with, but it makes more sense for a filesystem to support a tool rather than the other way round.

Discussion

  • Henry N.
    Henry N.
    2009-04-12

    What version of coLinux do you use? ("uname -r")

    Please update to version 0.7.4 from http://www.colinux.org/snapshots/
    Some of these errors are fixed in the new version, for example see
    * Bug #2176188: File sync wrong on cofs, command after mv/rename fails.

    But remember: cofs is a FAT filesystem and not all of the native filesystems works there. Symlinks are not supported. There exist also some problems with timestamps. So, some make utilities means that the file is in future. This is a result from small timediff between Host and Guest. Builds on cofs are limited to use, that generally can not change.

    I'm prefer to compile under your home directory and sync your work with rsync to the cofs drive on windows side.

    A quick test under Debian 4.0 with coLinux 0.7.4-rc1 is working perfectly:

    henry@coLinux:/media/windows$ uname -r
    2.6.22.18-co-0.7.4
    henry@coLinux:/media/windows$ cmake --version
    cmake version 2.4-patch 5
    henry@coLinux:/media/windows$ mount | grep cofs0
    cofs0 on /media/windows type cofs (rw,noexec,nosuid,nodev,uid=1000,gid=1000)
    henry@coLinux:/media/windows$ ls
    CMakeLists.txt main.c
    henry@coLinux:/media/windows$ cat CMakeLists.txt
    add_executable(halloworld main.c)
    henry@coLinux:/media/windows$ cat main.c
    #include <stdio.h>
    int main()
    {
    printf("Hallo World!\n");
    return 0;
    }
    henry@coLinux:/media/windows$ cmake . -G"Unix Makefiles"
    -- Check for working C compiler: /home/hn/bin/ccache/gcc
    -- Check for working C compiler: /home/hn/bin/ccache/gcc -- works
    -- Check size of void*
    -- Check size of void* - done
    -- Check for working CXX compiler: /home/hn/bin/ccache/c++
    -- Check for working CXX compiler: /home/hn/bin/ccache/c++ -- works
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /media/windows
    henry@coLinux:/media/windows$ make
    Scanning dependencies of target halloworld
    [100%] Building C object CMakeFiles/halloworld.dir/main.o
    Linking C executable halloworld
    [100%] Built target halloworld

     
  • Henry N.
    Henry N.
    2009-04-12

    Of curse, the same result without ccache:

    henry@coLinux:/media/windows$ cmake . -G"Unix Makefiles"
    -- Check for working C compiler: /usr/bin/gcc
    -- Check for working C compiler: /usr/bin/gcc -- works
    -- Check size of void*
    -- Check size of void* - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /media/windows

    Henry

     
  • Henry N.
    Henry N.
    2009-05-20

    • labels: --> Daemons (Windows)
    • assigned_to: nobody --> henryn
    • status: open --> closed-works-for-me