Page 1 of 1

problem with make in cross platform project Linux/Windows

Posted: Wed Nov 19, 2014 1:52 am
by acapola
My project is very simple: it consist in only one cpp file which needs one library (which I try to link statically, but end up with the dynamic one, but that's a separate matter)
I need to build it on windows and on linux, so I created one project configuration for each platform and edited the path to search libraries in each configuration.
I started with linux, got it to work and then moved to windows, editing the windows configuration, got it to work, job done :-)
Well, now linux build is broken :o
Of course I switched back to the linux configuration, but somehow it seems that the windows configuration impact/confuse make on linux.
I get the following error message:

/bin/sh -c '/usr/bin/make -e -f Makefile'
make: Warning: File `Makefile' has modification time 0.025 s in the future
----------Building project:[ ktcl - Debug ]----------
make[1]: Entering directory `/media/sf_dev/tcl/ktcl'
Debug/main.cpp.o.d:1: *** multiple target patterns. Stop.
make[1]: Leaving directory `/media/sf_dev/tcl/ktcl'
make: *** [All] Error 2
1 errors, 0 warnings

What can I do to solve that ?
or, alternatively, is there any recommended way to do such cross platform project ?

Re: problem with make in cross platform project Linux/Window

Posted: Thu Nov 20, 2014 11:52 am
by petah
set your system clocks with network time protofol & use some source control like git that'll stamp files you edit to the server time.

"Gentlemen - let's synchronize our watches" ;)

cheers,

-- p

Re: problem with make in cross platform project Linux/Window

Posted: Fri Nov 21, 2014 1:42 am
by acapola
thanks for the advices, I've got rid of that time skew, but the main problem remains:

/bin/sh -c '/usr/bin/make -e -f Makefile'
----------Building project:[ ktcl - Debug ]----------
make[1]: Entering directory `/media/sf_dev/tcl/ktcl'
Debug/main.cpp.o.d:1: *** multiple target patterns. Stop.
make[1]: Leaving directory `/media/sf_dev/tcl/ktcl'
make: *** [All] Error 2
1 errors, 0 warnings

Re: problem with make in cross platform project Linux/Window

Posted: Fri Nov 21, 2014 2:22 am
by petah
do your intermediate folders overlap by any chance? it sortof looks like you're on a usb key (or not?). On Linux you'd mount flash or ssd drives with -relatime or -noatime; timestamps become even less reliable.

My build paths are declared as $(VCTEMP)/$(ProjectName)/$(ConfigurationName) to avoid toe-treading. I assume you already checked for hidden files.

cheers,

-- p

Re: problem with make in cross platform project Linux/Window

Posted: Sun Nov 23, 2014 3:34 am
by acapola
indeed the intermediate directory was the same one: linux is in a vm running on windows. the code lite project is in a directory shared between the virtual machine and the host.
The problem is fixed now, by creating a new configuration for linux with a dedicated output directory.

Thanks for the hints