Skip to content
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

Error when configuring OpenTTD with OpenSSL1.1 installed with homebrew #7951

Closed
marimeireles opened this issue Jan 21, 2020 · 2 comments
Closed

Comments

@marimeireles
Copy link

marimeireles commented Jan 21, 2020

Version of OpenTTD

I'm using master 9d5dd89

Expected result

After cloning the repo and typing ./config in the terminal the expected result is to have a successful configuration.

Actual result

Got some errors complaining about the syntax of the config file:

s@!!CC_HOST!!@gcc@g; ...": bad flag in substitute command: '.'

Steps to reproduce

  1. Install OpenSSL using brew
  2. Clone the latest version of OpenTTD and try to configure it

If you do that homebrew will add an "@" symbol after OpenSSL to separate the name of the package from the version. That will break the config file because it will get confused with the "@" used in the config file.

How to fix it for good

My idea is to escape the strings you're getting from the environment, so you have control over the input strings so they don't interact with the special characters.

How to fix it in a hacky way

Go to your config.lib file, find the line that contains s@!!LDFLAGS!!@$T_LDFLAGS@g; and substitute the "@"s for something else like s^!!LDFLAGS!!^$T_LDFLAGS^g; . Now it works.

@glx22
Copy link
Contributor

glx22 commented Jan 21, 2020

Feel free to open a PR to fix it :)
Anyway this should not be a problem once #7270 is merged.

@marimeireles
Copy link
Author

I think I'm gonna wait for the patch =)
If anyone have problems with it they can find this issue and fix it the hacky way.
Thanks @glx22, I'm gonna close this one then.

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

No branches or pull requests

2 participants