Compiler does not work if workspace path contains spaces.
Summary
If you set your workspace to a path containing a space, the compiler does not work.
Steps and/or TTCN-3 code to reproduce
Set your workspace to a path containing a space, for instance C:\Users\lee\MUNKA_NOBACKUP\_SWAT\TITAN\test wsp
. (Don't worry, I do have backup, a manual, daily one, because of this exact reason -- the automatically synced folders on my machine have spaces in their paths.)
Then create any compilable TTCN-3 module, for example:
module asdf {
control{
log("A");
}
}
Then compile.
What is the current bug behavior?
Compilation fails.
What is the expected correct behavior?
Compilation succeeds.
Relevant logs and/or screenshots
**************************************************************
2023-01-26_10:59:43: starting to build asdf
**************************************************************
sh -c make dep
Makefile:137: warning: overriding recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
Makefile:130: warning: ignoring old recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
/home/lee/git/titan.core/Install/bin/compiler \
../src/asdf.ttcn - ../src/asdf.ttcn
Notify: Parsing TTCN-3 module `../src/asdf.ttcn'...
Notify: Checking modules...
Notify: Generating code...
Notify: File `asdf.cc' was updated.
Notify: 1 file was updated.
touch compile
makedepend -DWIN32 -I. -I/home/lee/git/titan.core/Install/include -I. -DMAKEDEPEND_RUN asdf.cc
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Types.h, line 37): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Vector.hh, line 21): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/JSON_Tokenizer.hh, line 18): cannot find include file "cstddef"
not in ./cstddef
not in /home/lee/git/titan.core/Install/include/cstddef
not in ./cstddef
not in /usr/include/cstddef
makedepend: warning: asdf.cc (reading /usr/include/sys/cdefs.h, line 47): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/stdio.h, line 36): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/stdio.h, line 40): cannot find include file "stdarg.h"
not in ./stdarg.h
not in /home/lee/git/titan.core/Install/include/stdarg.h
not in ./stdarg.h
not in /usr/include/stdarg.h
makedepend: warning: asdf.cc (reading /usr/include/sys/reent.h, line 14): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/sys/_types.h, line 24): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/stdlib.h, line 16): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Logger.hh, line 28): cannot find include file "stdarg.h"
not in ./stdarg.h
not in /home/lee/git/titan.core/Install/include/stdarg.h
not in ./stdarg.h
not in /usr/include/stdarg.h
makedepend: warning: asdf.cc (reading /usr/include/time.h, line 16): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Param_Types.hh, line 20): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/memory.h, line 18): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/memory.h, line 19): cannot find include file "stdarg.h"
not in ./stdarg.h
not in /home/lee/git/titan.core/Install/include/stdarg.h
not in ./stdarg.h
not in /usr/include/stdarg.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Param_Types.hh, line 25): cannot find include file "cstdio"
not in ./cstdio
not in /home/lee/git/titan.core/Install/include/cstdio
not in ./cstdio
not in /usr/include/cstdio
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/XER.hh, line 20): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/string.h, line 17): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/Port.hh, line 27): cannot find include file "stddef.h"
not in ./stddef.h
not in /home/lee/git/titan.core/Install/include/stddef.h
not in ./stddef.h
not in /usr/include/stddef.h
makedepend: warning: asdf.cc (reading /usr/include/sys/_intsup.h), line 71: #error "Unable to determine type definition of intptr_t"
makedepend: warning: asdf.cc (reading /usr/include/sys/_intsup.h), line 78: #error "Unable to determine type definition of int32_t"
makedepend: warning: asdf.cc (reading /usr/include/stdint.h), line 170: #error required type int_least8_t missing
makedepend: warning: asdf.cc (reading /usr/include/stdint.h), line 192: #error required type int_least16_t missing
makedepend: warning: asdf.cc (reading /usr/include/stdint.h), line 226: #error required type int_least32_t missing
"/usr/include/stdint.h":364: defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
^--- expecting )
"/usr/include/stdint.h":375: defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
^--- expecting )
makedepend: warning: asdf.cc (reading /home/lee/git/titan.core/Install/include/OOP.hh, line 18): cannot find include file "functional"
not in ./functional
not in /home/lee/git/titan.core/Install/include/functional
not in ./functional
not in /usr/include/functional
Operation finished successfully.
sh -c make all -j 8
Makefile:137: warning: overriding recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
Makefile:130: warning: ignoring old recipe for target '/cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test'
g++ -c -DWIN32 -I. -I/home/lee/git/titan.core/Install/include -I. -Wall -O2 -o asdf.o asdf.cc
ar -r /cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test wsp/asdf/bin/asdf.a asdf.o
g++ -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc -o wsp/asdf/bin/asdf.exe asdf.o \
-L/home/lee/git/titan.core/Install/lib -L/home/lee/git/titan.core/Install/lib -L/home/lee/git/titan.core/Install/lib \
-lttcn3-parallel -lcrypto \
-lxml2 \
|| if [ -f /home/lee/git/titan.core/Install/bin/titanver ]; then /home/lee/git/titan.core/Install/bin/titanver asdf.o ; else : ; fi
ar: creating /cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test
ar: wsp/asdf/bin/asdf.a: No such file or directory
make: *** [Makefile:137: /cygdrive/c/Users/lee/MUNKA_NOBACKUP/_SWAT/TITAN/test] Error 1
make: *** Waiting for unfinished jobs....
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot open output file wsp/asdf/bin/asdf.exe: No such file or directory
collect2: error: ld returned 1 exit status
Operation failed with return value: 2
It seems the compiler only takes into account the part of the path coming before or after the space.
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari