Skip to content

Comments

Fix building dlang.org from scratch#2340

Closed
wilzbach wants to merge 1 commit intodlang:masterfrom
wilzbach:fix-raw-start
Closed

Fix building dlang.org from scratch#2340
wilzbach wants to merge 1 commit intodlang:masterfrom
wilzbach:fix-raw-start

Conversation

@wilzbach
Copy link
Contributor

See: https://forum.dlang.org/post/azdfcrfqegubikcyntfj@forum.dlang.org

The problem was that GIT_HOME was undefined and thus the git clone failed.
I think we should really have a CI for this. @CyberShadow what do you think about re-enabling Travis?

I also added a hint about DIFFABLE=1 to the docs while I was at it.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

- make -f posix.mak test
- make -f posix.mak html
- make -f posix.mak clean && rm -rf ../{dmd,druntime,phobos,tools,installer,dub}
- make -f posix.mak all
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we should test the two most important targets: html and all

GIT_HOME=https://github.com/dlang

# Auto-cloning missing directories
$(shell [ ! -d $(DMD_DIR) ] && git clone --depth=1 ${GIT_HOME}/dmd $(DMD_DIR))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now GIT_HOME is no longer undefined and checking out /dmd doesn't fail.

posix.mak Outdated
# Clone all main D repositories
${DMD_DIR} ${DRUNTIME_DIR} ${PHOBOS_DIR} ${TOOLS_DIR} ${INSTALLER_DIR} ${DUB_DIR}:
git clone ${GIT_HOME}/$(notdir $(@F)) $@
git clone --depth=1 ${GIT_HOME}/$(notdir $(@F)) $@
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It takes quite a long time to do a full checkout of dmd and it isn't really required.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git history is needed for git describe to work properly, so this might not be a good idea.


changelog/prerelease.dd: $G/changelog/next-version $(LOOSE_CHANGELOG_FILES) | \
${STABLE_DMD} $(TOOLS_DIR) $(INSTALLER_DIR) $(DUB_DIR)
${STABLE_DMD} $(DMD_DIR) $(DRUNTIME_DIR) $(PHOBOS_DIR) $(TOOLS_DIR) $(INSTALLER_DIR) $(DUB_DIR)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

druntime and phobos weren't cloned by default for the changelog script anymore.

posix.mak Outdated
# Clone all main D repositories
${DMD_DIR} ${DRUNTIME_DIR} ${PHOBOS_DIR} ${TOOLS_DIR} ${INSTALLER_DIR} ${DUB_DIR}:
git clone ${GIT_HOME}/$(notdir $(@F)) $@
git clone --depth=1 ${GIT_HOME}/$(notdir $(@F)) $@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git history is needed for git describe to work properly, so this might not be a good idea.

CONTRIBUTING.md Outdated

The dlang.org build process depends on many files which are downloaded during
the build process. If you happen to have a slow internet connection, you can skip
these downloads with `DIFFABLE=`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How true is this really?

CONTRIBUTING.md Outdated
ended with error code 0, directory `web` contains the produced HTML
files. Take a moment to open `web/index.html` in a browser.

### Building without changing files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"without changing files" is kind of ambiguous here

CONTRIBUTING.md Outdated

Please see the [Ddoc fundamentals](https://wiki.dlang.org/Contributing_to_dlang.org).

### Learn about the more Makefile targets and options
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't sound right. s/the // ?

@CyberShadow
Copy link
Member

@CyberShadow what do you think about re-enabling Travis?

Why was it disabled?

I don't know if it's going to bring enough benefit vs. the overhead of managing another CI. I guess we could try and see if it doesn't get in the way too much?

@zachthemystic
Copy link
Contributor

I just tried "make -f posix.mak all" again. It still fails for me, after:"
CC="c++" /tmp/.host_dmd-2.072.2/dmd2/osx/bin/dmd -conf=/tmp/.host_dmd-2.072.2/dmd2/osx/bin/dmd.conf -of../generated/osx/release/64/dmd -m64 -vtls -J../generated/osx/release/64 -J../res -L-lstdc++ -version=MARS -fPIC -w -de dmd/access.d .....
.......................(Long list of files).................
sed -i -e "s|../druntime/import |../druntime-2.079.0/import |" -e "s|../phobos |../phobos-2.079.0 |" .generated/dmd-2.079.0/generated/osx/release/64/dmd.conf
sed: -e: No such file or directory
make: *** [.generated/dmd-2.079.0/generated/osx/release/64/dmd] Error 1
make: *** Deleting file `.generated/dmd-2.079.0/generated/osx/release/64/dmd'
"

@CyberShadow
Copy link
Member

Looks like your sed isn't GNU sed.

@zachthemystic
Copy link
Contributor

@wilzbach
Copy link
Contributor Author

Why was it disabled?

I think because we moved the testsuite to DAutoTest to keep the CI overhead low here.

I don't know if it's going to bring enough benefit vs. the overhead of managing another CI. I guess we could try and see if it doesn't get in the way too much?

Ok enabled. Ideally it should just work "out of the box" (as for any fresh checkout).

Looks like your sed isn't GNU sed.

Ok. I added a "Posix-compatible" way with using a temporary file. Not sure why we need to build this compiler anyhow, Maybe we can even remove the dependence on this entirely, but for now "... && mv" should work.

@zachthemystic
Copy link
Contributor

Build failed. But at least we know that it ran for 15 minutes and 50 seconds before doing so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants