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

Getting this to build on Ubuntu 16.04 #28

Conversation

randlem
Copy link
Collaborator

@randlem randlem commented Sep 22, 2016

This commit fixes the issue that @promorphus was having related to issue #26. Works on Ubuntu 16.04 with PHP7 installed from apt.

@@ -7,6 +7,6 @@

package engine

// #cgo CFLAGS: -I/usr/include/php/20151012 -Iinclude/php7 -Isrc/php7
// #cgo CFLAGS: -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/TSRM -Iinclude/php7 -Isrc/php7
Copy link
Owner

Choose a reason for hiding this comment

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

Could you break these in two lines, as in php5.go? Otherwise looks great.

@deuill
Copy link
Owner

deuill commented Sep 23, 2016

@randlem Perfect, thanks for this. Makes complete and total sense, if you can fix the review comments I'll push this ASAP.

@promorphus
Copy link

Hmm, I've got a slight issue actually. So building this is fine, but then attempting to invoke it causes essentially the same issue. Here's what I'm looking at (again).

vagrant@CHANGEME:~/go/src/github.com/deuill/go-php/engine$ go get -tags php7.debian github.com/deuill/go-php
vagrant@CHANGEME:~/go/src/github.com/deuill/go-php/engine$

Yeah success!

But then....

package main

import php "github.com/deuill/go-php"

func main() {

    script := php.New()
    return
}

Go building this gives me....

vagrant@CHANGEME:~/go/src/github.onpay.com/parasshah/test$ go build
# github.com/deuill/go-php/engine
../../../github.com/deuill/go-php/engine/context.go:11:23: fatal error: main/php.h: No such file or directory
 // #include <main/php.h>
                       ^
compilation terminated.

@promorphus promorphus mentioned this pull request Sep 23, 2016
@deuill deuill merged commit a461818 into deuill:feature/26_fix-debian-build-issues Sep 23, 2016
borancar pushed a commit to borancar/go-php that referenced this pull request Dec 1, 2019
Savestates

Approved-by: Matthew Tyas <matthew.tyas@antstream.com>
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.

3 participants