Skip to content

compatibility issues in configure and make tidy #22041

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

Merged
merged 1 commit into from
Feb 14, 2015

Conversation

semarie
Copy link
Contributor

@semarie semarie commented Feb 7, 2015

the sed option --in-place (or -i) is a GNU extension, and it is not
portable to BSD system (openbsd and freebsd checked).

use an alternate construction in order to keep the semantic.

the sed option `--in-place` (or `-i`) is a GNU extension, and it is not
portable to BSD system (openbsd and freebsd checked).

use an alternate construction in order to keep the semantic.
@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@semarie semarie changed the title configure: sed -i option isn't portable compatibility issues in configure and make tidy Feb 7, 2015
@semarie
Copy link
Contributor Author

semarie commented Feb 7, 2015

I add a patch for a compatibility issue with find, use for make tidy

@@ -254,7 +254,7 @@ tidy-basic:
.PHONY: tidy-binaries
tidy-binaries:
@$(call E, check: binaries)
$(Q)find $(S)src -type f -perm +a+x \
$(Q)find $(S)src -type f -perm /a+x \
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately it looks like this may not work on osx:

$ find . -type f -perm /a+x
find: -perm: /a+x: illegal mode string

@semarie
Copy link
Contributor Author

semarie commented Feb 8, 2015

I have revert the change about find.
It seems that the find utility under macos isn't the GNU one (and not the same as under openbsd).

I have check the form -perm +mode against POSIX, and it isn't a POSIX form. So the problem of portability remains...

@semarie
Copy link
Contributor Author

semarie commented Feb 8, 2015

osx should be ok (I have checked against the manual page on the apple website)
all options are now POSIX (if I miss any).

@alexcrichton
Copy link
Member

@bors: r+ 30b8078

Thanks!

@bors
Copy link
Collaborator

bors commented Feb 8, 2015

⌛ Testing commit 30b8078 with merge e95e3a8...

@bors
Copy link
Collaborator

bors commented Feb 8, 2015

💔 Test failed - auto-win-32-opt

@semarie
Copy link
Contributor Author

semarie commented Feb 9, 2015

hum... I am not sure about the error under Windows. Maybe the shell miss interpret the ! char ? (it would need \!)

@alexcrichton what is the build env under windows ? cygwin I think ? I would like to test locally, instead of blindly provide a patch...

@semarie
Copy link
Contributor Author

semarie commented Feb 9, 2015

I am note sure that the failed is related to my patch, or how it is related to it...

Next, the failed as captured by log:

check: binaries
Binaries checked into src:
/c/bot/slave/auto-win-32-opt/build/src/test/pretty/issue-4264.pp
/c/bot/slave/auto-win-32-opt/build/mk/tests.mk:256: recipe for target 'tidy-binaries' failed
make: *** [tidy-binaries] Error 123

The line Binaries checked into src: come from src/etc/check-binaries.py, which is after the changed find command (it is the last command in the pipe, called with xargs). So the changed find command was run successfully.

The error is due to the file src/test/pretty/issue-4264.pp, which match the find.
So either:

  • the file src/test/pretty/issue-4264.pp was executable for this build only (but why ?)
  • the file src/test/pretty/issue-4264.pp is executable on this host, but the previous find doesn't match it (but why ?)
  • the find match differently than before (but not under linux nor mac [the others buildbot test that are ok])

@alexcrichton any clue ?

@alexcrichton
Copy link
Member

Hm I've seen this warning about that file being executable before, but I'm not quite sure why it's cropping up. Our windows bots currently run inside of MSYS2 with both a 32 and 64 bit shell (using mingw-w64 as a compiler).

@semarie
Copy link
Contributor Author

semarie commented Feb 12, 2015

@alexcrichton I have no way to easily check the make tidy problem on windows host.
What do you think ? Should I just revert the patch about make tidy for now ?

@alexcrichton
Copy link
Member

I may be best to revert the changes to find for now.

@semarie
Copy link
Contributor Author

semarie commented Feb 13, 2015

I have rebased to more recent HEAD, and removed the three lasts patchs (first try with find, a revert, and another try...)

@alexcrichton
Copy link
Member

@bors: r+ 04b7976

bors added a commit that referenced this pull request Feb 14, 2015
the sed option `--in-place` (or `-i`) is a GNU extension, and it is not
portable to BSD system (openbsd and freebsd checked).

use an alternate construction in order to keep the semantic.
@bors
Copy link
Collaborator

bors commented Feb 14, 2015

⌛ Testing commit 04b7976 with merge 95b228a...

@bors bors merged commit 04b7976 into rust-lang:master Feb 14, 2015
@semarie semarie deleted the configure-compat branch February 14, 2015 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants