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

crypto: "error Never include this file directly. Use <lzma.h> instead." during test #25240

Open
dlsniper opened this issue May 3, 2018 · 16 comments

Comments

@dlsniper
Copy link
Contributor

commented May 3, 2018

Hi,

We just got the following report, https://youtrack.jetbrains.com/issue/GO-5653, on our issue tracker but I believe this is a Go issue.

By the looks of it, the user is using at least Go 1.10 on a macOS. I suspect this has something to do with the fact that we force Go to compile the test binary with -gcflags="all=-N -l" in order to improve the debugging experience for the users.

Thank you.

OS: Mac OS X (10.13.4, x86_64) 
GOROOT=/usr/local/go
GOPATH=/Users/xueqzhan/source/go

/usr/local/go/bin/go test -c -o /private/var/folders/fx/2f29vz253_z8grcj9cbkq3jw0000gn/T/___TestFollowerOnly_in_planner_scheduler_election -gcflags "all=-N -l" planner-scheduler/election

# crypto/x509
In file included from /usr/local/go/src/crypto/x509/root_cgo_darwin.go:16:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
#       error Never include this file directly. Use <lzma.h> instead.
        ^
1 error generated.

Compilation finished with exit code 2
@adamdecaf

This comment has been minimized.

Copy link
Contributor

commented May 3, 2018

@dlsniper can we tell what version of CoreFoundation.framework source code they're on?

I don't have a /usr/local/include/Block.h on my OSX (10.13.4) install.

@andybons andybons changed the title crypto: Never include this file directly. Use <lzma.h> instead crypto: use lzma.h instead of Block.h May 4, 2018

@andybons andybons changed the title crypto: use lzma.h instead of Block.h crypto: "error Never include this file directly. Use <lzma.h> instead." during test May 4, 2018

@andybons andybons added this to the Unplanned milestone May 4, 2018

@dlsniper

This comment has been minimized.

Copy link
Contributor Author

commented May 5, 2018

Unfortunately, I cannot. However, I asked the user about this: https://youtrack.jetbrains.com/issue/GO-5653#comment=27-2855172

@cc14514

This comment has been minimized.

Copy link

commented May 10, 2018

I get same error when I copy Applications from one Macbook to another , maybe the copy that overlay the "/usr/local/include" dir , so move it and use global librarys .
you can execute :
sudo mv /usr/local/include /usr/local/include_old

and try again

@DavidWangWood

This comment has been minimized.

Copy link

commented May 11, 2018

I have same issue too.
Can someone tell us which way we should go?

@cc14514

This comment has been minimized.

Copy link

commented May 17, 2018

sudo mv /usr/local/include /usr/local/include_old

@byrain

This comment has been minimized.

Copy link

commented Jun 21, 2018

@cc14514 This solved my issue. Thank you so much :)

@jacklinton

This comment has been minimized.

Copy link

commented Jun 29, 2018

Why doesn't Apple's migration assistant take care of something like this???? Thank you for posting.

@adamdecaf

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2018

cc @FiloSottile several users seem to be running into this, but I'm not sure what Go could do.

@mzying2013

This comment has been minimized.

Copy link

commented Jul 10, 2018

@cc14514 How did you know about this solution? It has been bothering me for a long time. thank you very much.

@ulampinoy

This comment has been minimized.

Copy link

commented Oct 15, 2018

I get same error when I copy Applications from one Macbook to another , maybe the copy that overlay the "/usr/local/include" dir , so move it and use global librarys .
you can execute :
sudo mv /usr/local/include /usr/local/include_old

and try again

Thanks, solved my issues too!

@mkval

This comment has been minimized.

Copy link

commented Dec 18, 2018

I get same error when I copy Applications from one Macbook to another , maybe the copy that overlay the "/usr/local/include" dir , so move it and use global librarys .
you can execute :
sudo mv /usr/local/include /usr/local/include_old

and try again

Works perfectly! Just migrated to my new machine and came across the issue when I ran a Swift script. Thanks again.

@kgoodrick

This comment has been minimized.

Copy link

commented Jan 17, 2019

sudo mv /usr/local/include /usr/local/include_old

Worked perfectly! Thanks @cc14514

@ggilder

This comment has been minimized.

Copy link

commented Jan 28, 2019

In case you don't want to mess with the whole /usr/local/include directory - you can also just rm /usr/local/include/block.h

@cc14514

This comment has been minimized.

Copy link

commented Feb 10, 2019

@cc14514 This solved my issue. Thank you so much :)

I'm glad to help you.

@cc14514

This comment has been minimized.

Copy link

commented Feb 10, 2019

@cc14514 How did you know about this solution? It has been bothering me for a long time. thank you very much.

you are welcome, It's been bothering me for a long time too.

@cc14514

This comment has been minimized.

Copy link

commented Feb 10, 2019

I'm glad to help you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.