-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to build master branch following instructions in documentation #8605
Comments
It is found that " around tags is not required. Can it be corrected in documentation. It is confusing. |
Heya! Sorry you found it confusing. Which document were you looking at and where? Glad you got it building in the end. |
Actually I am still not able to build. Is Dockerfile compatible building on windows system? Following places flags are wrapped with double quotes which is causing error in cmd |
I am able to build now. Please do the needful to documentation and close the issue. One thing i want to know my build .exe is only 60 mb but released versions are around 100mb . why? |
Ah you're building on Windows. Sigh. Ok those docs expect you to be working in a reasonable shell which cmd is not. Powershell might work otherwise you might need a cygwin or other such environment. I'm gonna defer to @lunny and his expertise here. You need to set the TAGS as an environment variable before running make - that's what the TAGS="..." is trying to do. I think trying to build a docker on windows might fail though - I don't know if xgo can cross-compile from Windows. |
Successfully build from cmd. @echo on
go get -d code.gitea.io/gitea
C:
cd "%GOPATH%/src/code.gitea.io/gitea"
set TAGS=bindata sqlite sqlite_unlock_notify
make clean
make generate
make build |
One thing i want to know my build .exe is only 60 mb but released versions are around 100mb . why? |
Are you sure you shouldn't have e.g. set TAGS="bindata sqlite sqlite_unlock_notify" If you haven't embedded SQLite into the binary that could explain why it is 40Mb smaller. EDIT: Just when you think cmd couldn't be worse you see something worse. |
is invalid statement giving error as : code.gitea.io/giteausage: link [options] main.o No proper usage of statement |
If you haven't embedded SQLite into the binary that could explain why it is 40Mb smaller. ? |
In Windows Command Prompt, the quotes become part of the variable:
Yes, it's very frustrating. Writing "proper" batch files in Windows is a dark art full of caveats, workarounds and lots of toads 🐸. I think git-bash should be used to build under Windows (although I didn't tried). |
When I develop Gitea on Windows, I use Git Bash, which so far has allowed me to use the same commands as our documentation. |
Is embedding SQLite into binary necessary. My 60mb binary working fine till now |
Embedding SQLite (library) is only necessary if you plan on using SQLite. |
But how come it is working fine with my old installation? |
Looks like you embedded SQLite |
But i got 60mb binary from above build process |
When I build Gitea locally on Windows, mine is also ~60mb. |
[x]
):Description
I am not able to build master branch trying to build after issue #8603 resolved.
steps followed
go get -d -u code.gitea.io/gitea
cd "$GOPATH/src/code.gitea.io/gitea"
TAGS="bindata sqlite sqlite_unlock_notify" make generate build
...
Screenshots
The text was updated successfully, but these errors were encountered: