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

header '/usr/include/gd.h' not found #4

Open
ibrahimkteish opened this issue Aug 15, 2017 · 7 comments
Open

header '/usr/include/gd.h' not found #4

ibrahimkteish opened this issue Aug 15, 2017 · 7 comments

Comments

@ibrahimkteish
Copy link

Package.swift content:

import PackageDescription
let package = Package(
name: "project5",
dependencies: [
.Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1),
.Package(url: "https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git", majorVersion: 1),
.Package(url: "https://github.com/IBM-Swift/HeliumLogger.git", majorVersion: 1),
.Package(url: "https://github.com/twostraws/SwiftGD.git", majorVersion: 1)
]
)
OP: MacOS Sierra/Ubuntu 16.04 (DigitalOcean)
Env: Docker using ibmcom/swift-ubuntu:latest/ also I tried it without docker

root@bb33f543917b:/projects/project5# swift build
Compile Swift Module 'SwiftGD' (1 sources)
Compile CHTTPParser utils.c
Compile Swift Module 'KituraStencil' (1 sources)
Compile CHTTPParser http_parser.c
/projects/project5/.build/checkouts/Cgd.git--1390626494485699789/module.modulemap:2:9: error: header '/usr/include/gd.h' not found
header "/usr/include/gd.h"
^
/projects/project5/.build/checkouts/SwiftGD.git-1170172309405307774/Sources/SwiftGD.swift:3:9: error: could not build Objective-C module 'Cgdlinux'
import Cgdlinux
^
:0: error: build had 1 command failures
error: exit(1): /usr/bin/swift-build-tool -f /projects/project5/.build/debug.yaml

@ibrahimkteish
Copy link
Author

ibrahimkteish commented Aug 15, 2017

Ubuntu Output:

root@smart:~# mkdir swiftGD
root@smart:~# cd swiftGD/
root@smart:~/swiftGD# swift package init --type executable
Creating executable package: swiftGD
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/main.swift
Creating Tests/
root@smart:~/swiftGD# vi Package.swift
root@smart:~/swiftGD# swift build
Fetching https://github.com/IBM-Swift/Kitura.git
Fetching https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git
Fetching https://github.com/IBM-Swift/HeliumLogger.git
Fetching https://github.com/twostraws/SwiftGD.git
Fetching https://github.com/IBM-Swift/Kitura-net.git
Fetching https://github.com/IBM-Swift/SwiftyJSON.git
Fetching https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Fetching https://github.com/IBM-Swift/LoggerAPI.git
Fetching https://github.com/IBM-Swift/BlueSocket.git
Fetching https://github.com/IBM-Swift/CCurl.git
Fetching https://github.com/IBM-Swift/BlueSSLService.git
Fetching https://github.com/IBM-Swift/CEpoll.git
Fetching https://github.com/IBM-Swift/BlueSignals.git
Fetching https://github.com/IBM-Swift/OpenSSL.git
Fetching https://github.com/kylef/Stencil
Fetching https://github.com/kylef/PathKit.git
Fetching https://github.com/kylef/Spectre.git
Fetching https://github.com/twostraws/Cgd.git
Cloning https://github.com/kylef/Spectre.git
Resolving https://github.com/kylef/Spectre.git at 0.7.2
Cloning https://github.com/twostraws/SwiftGD.git
Resolving https://github.com/twostraws/SwiftGD.git at 1.1.0
Cloning https://github.com/IBM-Swift/SwiftyJSON.git
Resolving https://github.com/IBM-Swift/SwiftyJSON.git at 16.0.1
Cloning https://github.com/IBM-Swift/BlueSignals.git
Resolving https://github.com/IBM-Swift/BlueSignals.git at 0.9.48
Cloning https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git
Resolving https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git at 1.8.2
Cloning https://github.com/IBM-Swift/CCurl.git
Resolving https://github.com/IBM-Swift/CCurl.git at 0.4.0
Cloning https://github.com/IBM-Swift/LoggerAPI.git
Resolving https://github.com/IBM-Swift/LoggerAPI.git at 1.7.0
Cloning https://github.com/kylef/Stencil
Resolving https://github.com/kylef/Stencil at 0.9.0
Cloning https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Resolving https://github.com/IBM-Swift/Kitura-TemplateEngine.git at 1.7.1
Cloning https://github.com/IBM-Swift/CEpoll.git
Resolving https://github.com/IBM-Swift/CEpoll.git at 0.1.0
Cloning https://github.com/IBM-Swift/Kitura-net.git
Resolving https://github.com/IBM-Swift/Kitura-net.git at 1.7.15
Cloning https://github.com/IBM-Swift/OpenSSL.git
Resolving https://github.com/IBM-Swift/OpenSSL.git at 0.3.6
Cloning https://github.com/IBM-Swift/HeliumLogger.git
Resolving https://github.com/IBM-Swift/HeliumLogger.git at 1.7.0
Cloning https://github.com/IBM-Swift/BlueSocket.git
Resolving https://github.com/IBM-Swift/BlueSocket.git at 0.12.61
Cloning https://github.com/IBM-Swift/BlueSSLService.git
Resolving https://github.com/IBM-Swift/BlueSSLService.git at 0.12.48
Cloning https://github.com/IBM-Swift/Kitura.git
Resolving https://github.com/IBM-Swift/Kitura.git at 1.7.6
Cloning https://github.com/kylef/PathKit.git
Resolving https://github.com/kylef/PathKit.git at 0.8.0
Cloning https://github.com/twostraws/Cgd.git
Resolving https://github.com/twostraws/Cgd.git at 0.1.0
Compile Swift Module 'Signals' (1 sources)
Compile Swift Module 'Socket' (3 sources)
Compile Swift Module 'LoggerAPI' (1 sources)
Compile Swift Module 'SwiftGD' (1 sources)
/root/swiftGD/.build/checkouts/Cgd.git--7310932728750933443/module.modulemap:2:9: error: header '/usr/include/gd.h' not found
header "/usr/include/gd.h"
^
/root/swiftGD/.build/checkouts/SwiftGD.git-6451823937131720639/Sources/SwiftGD.swift:3:9: error: could not build Objective-C module 'Cgdlinux'
import Cgdlinux
^
Compile Swift Module 'Spectre' (8 sources)
Compile Swift Module 'KituraTemplateEngine' (1 sources)
Compile Swift Module 'SwiftyJSON' (2 sources)
:0: error: build had 1 command failures
error: exit(1): /swift/swift-3.1.1-RELEASE-ubuntu16.04/usr/bin/swift-build-tool -f /root/swiftGD/.build/debug.yaml

@ghost
Copy link

ghost commented Aug 22, 2017

Getting the same thing on a Heroku install.
Have added libgd-dev to the Aptfile installed on Heroku.

@ibrahimkteish
Copy link
Author

@tobegit Thank you it worked for me too on ubuntu 16.04

@Ruckt
Copy link

Ruckt commented Sep 12, 2017

I am getting this error while using Docker.

@tjshae
Copy link

tjshae commented Jan 5, 2018

Hmm. libgd-dev in the Aptfile is no longer working on Heroku. I still get the same error:

remote: Compile Swift Module 'SwiftGD' (1 sources)
remote: /tmp/build_964bf7f7a7eb98b68ef1e1f060c0ad32/.build/checkouts/Cgd.git--8701043272991523524/module.modulemap:2:9: error: header '/usr/include/gd.h' not found
remote: header "/usr/include/gd.h"
remote: ^
remote: /tmp/build_964bf7f7a7eb98b68ef1e1f060c0ad32/.build/checkouts/SwiftGD.git-2728462164667119928/Sources/SwiftGD/SwiftGD.swift:3:9: error: could not build C module 'Cgdlinux'
remote: import Cgdlinux

@mcritz
Copy link
Contributor

mcritz commented Oct 25, 2019

I believe this issue has been fixed in 2.5.0. Can anyone reproduce this in current release?

@shial4
Copy link

shial4 commented Aug 31, 2023

It isn't working for me with Swift package manager & Vapor,
Neither Docker, nor MacOs

...SourcePackages/checkouts/SwiftGD/Sources/gd/swiftgd_gd.h:1:10 'gd.h' file not found

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

5 participants