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

Building on Mac OSX #2

Closed
cem- opened this issue Aug 2, 2015 · 4 comments
Closed

Building on Mac OSX #2

cem- opened this issue Aug 2, 2015 · 4 comments
Assignees

Comments

@cem-
Copy link

cem- commented Aug 2, 2015

Currently, the build exits with errors on OS X.
In trying to get this to build, so far I have changes in the mk\ring.mk:
...
-$(RING_LIB): ARFLAGS = cDrs
+$(RING_LIB): ARFLAGS = crs
...
-PERLASM_x86_ARGS = elf -fPIC -DOPENSSL_IA32_SSE2
-PERLASM_x86_64_ARGS = elf
+PERLASM_x86_ARGS = macosx -fPIC -DOPENSSL_IA32_SSE2
+PERLASM_x86_64_ARGS = macosx
...

The first is because there is not a deterministic flag for ar on OSX, the second to build to the Mac platform.

Also, apparently --gc-sections is deprecated now on OSX, I saw it mentioned[1] that -dead_strip should replace it.
mk/top_of_makefile.mk
-LDFLAGS += -Wl,--gc-sections
+LDFLAGS += -Wl,-dead_strip

[1] http://stackoverflow.com/questions/24734409/make-error-in-mac-clang-ld-unknown-option-gc-sections

After making those changes, I was able to successfully build (x86 and x86_64) on OSX and get a 'PASS' on the various tests I tried in the bin/crypto folder.

-cem

@briansmith
Copy link
Owner

Thanks! FYI, you can run all the tests with make check. I'm making the changes you pointed out now. Thanks again!

@briansmith
Copy link
Owner

@cem- Thanks a lot for your help! Could you please review pull request #3 and see if that fixes the build?

@cem-
Copy link
Author

cem- commented Aug 3, 2015

@briansmith - You're very welcome; I pulled down the osx branch and was able to build and test successfully with all the instructions provided. Works great!

@briansmith
Copy link
Owner

Thanks, I merged this into the wip branch.

briansmith pushed a commit that referenced this issue Aug 27, 2015
As I read it:

1. |_LHASH| contains
2.   buckets of |LHASH_ITEMS|, which contain
3.     |CONF_VALUE|s, which contain
4.       various bits of data.

The previous code was freeing #1 and #2 in |lh_free|, and #4 in
|value_free_contents|, but was failing to free the |CONF_VALUE|s
themselves.  The fix is to call |value_free| rather than
|value_free_contents|.

Change-Id: I1d5b48692ca9ac04df688e45d7fc113dc5cd6ddf
Reviewed-on: https://boringssl-review.googlesource.com/5742
Reviewed-by: Adam Langley <[email protected]>
briansmith pushed a commit that referenced this issue Mar 27, 2017
This reduces us from seven different configuration patterns to six (see
comment #2 of linked bug). I do not believe there is any behavior change
here as SSL_set_SSL_CTX already manually copied the field. It now gives
us a nice invariant: SSL_set_SSL_CTX overrides all and only the
dual-SSL/SSL_CTX options hanging off of CERT.

BUG=123

Change-Id: I1ae06b791fb869917a6503cee41afb2d9be53d89
Reviewed-on: https://boringssl-review.googlesource.com/13865
Reviewed-by: David Benjamin <[email protected]>
Commit-Queue: David Benjamin <[email protected]>
CQ-Verified: CQ bot account: [email protected] <[email protected]>
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