Forum moved here!

Home / Invalid startDir when building with doit.bat


Hello, I am a newbie programmer and I want to build SumatraPDF. So I cloned the latest master branch into my computer. But when I ran doit.bat -build-pre-rel, according to here, I was greeted with this error:

C:\Users\User\sumatrapdf-master>doit.bat -build-pre-rel

C:\Users\User\sumatrapdf-master\do>go run . -build-pre-rel
panic: invalid startDir: 'C:\Users\User\sumatrapdf-master\do', dir: 'C:\'

goroutine 1 [running]:, {0xc000172d80, 0x3, 0x3})
        C:/Users/User/go/pkg/mod/[email protected]/u/base.go:26 +0x59
main.cdUpDir({0x84f7c1, 0xa})
        C:/Users/User/sumatrapdf-master/do/util.go:274 +0x47
        C:/Users/User/sumatrapdf-master/do/main.go:147 +0x6a
exit status 2

How do I fix this and build successfully?


This type of question is best asked in the main support site so look if

gives you clues


Thanks for responding :heartbeat:

Based on the link you suggested, the parent directory containing the project must be named sumatrapdf. I fixed that problem and another problem popped up:

Current directory: C:\Users\User\sumatrapdf-master\sumatrapdf
upload: false
sign: false
verifyTranslationUpToDate: true
Finished in 0s
panic: NYI

goroutine 1 [running]:
        C:/Users/User/sumatrapdf-master/sumatrapdf/do/main.go:127 +0x255
        C:/Users/User/sumatrapdf-master/sumatrapdf/do/main.go:284 +0x994
exit status 2

It seems that verifyTranslationsMust() in ./do/translations.go is not yet implemented. To solve this problem, I must set opts.verifyTranslationUpToDate in ./do/main.go to false. However, the default for this option for local pre-release and release builds seems to be true.

May I know if it is possible to set this option from doit.bat without altering the Go scripts, and if so, how?

This type of question is best asked in the main support site

Well… I thought Github Issues was only for reporting bugs, regressions, and feature requests and not for discussions and tech support :sweat_smile: I will post my next issues there.

Thanks again :slightly_smiling_face:


Hahaha nevermind :sweat_smile: I feel so silly.

I just have to remove the -build-pre-rel flag in doit.bat

Thanks :smile: