I have some makefile that is used to compile a program. During compilation I get an error:
In file included from kernel/driver.cc:20:
./kernel/yosys.h:81:12: fatal error: tcl.h: No such file or directory
81 | # include <tcl.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:696: kernel/driver.o] Error 1
Then I rerun Cygwin setup application and install new package tcl-devel. I restart the Cygwin terminal and try again. The same error pops up. I don't understand! Why aren't headers found?
My tcl and tcl-devel are both of version 8.6.11-1.
I hit this when compiling taffybar module. It is very strange that actually claim that I need load this hidden module, which is itself. Error msgs are below:
[~/Public/taffybar]-[myMaster↓]── - rm -rf ~/.cache/taffybar && taffybar
Configuration '/home/jethros/.config/taffybar/taffybar.hs' changed.
Recompiling.
Error occurred while loading configuration file.
Error:
/home/jethros/.config/taffybar/taffybar.hs:26:1: error:
Failed to load interface for ‘System.Taffybar.ToggleMonitor’
It is a member of the hidden package ‘taffybar-0.4.6’.
Use -v to see a list of the files searched for.
I'm facing an error when compiling my Java sources to produce C++ headers recently: javah spits a package does not exist error for some file.
tl;dr: javah works fine for a Java source but not another one – which import clauses are pretty close; gradle does not process some libraries but even the packages of the processed ones get flagged as missing.
I don't know why javah has started spitting that error since it worked well until recently and I did not change anything special. I'm using gradle with Android Studio's gradle-wrapper. I recently updated the wrapper's distribution from 2.2.1 to 2.10 but I don't think that's why javah fails now.
According to the logs and the present files, javah doesn't find the packages from libraries I'm using as it compiles ClassB but not ClassA.
Let's take two examples: com.batch.android and com.adjust.sdk
com.batch.android library does get processed by gradle so its jars are in my build/intermediates/exploded-aar folder (under com.batch.android/batch-sdk/1.5.3/jars/classes.jar and com.batch.android/batch-sdk/1.5.3/jars/libs/batch.jar)
com.adjust.sdk library does not get processed by gradle so its jars are not in my build/intermediates/exploded-aar
both are in my ~/.gradle/cache/ folder
both packages fail as missing by javah
both packages are not imported from ClassA and ClassB java files
Thanks for your help!
The gradle logs (sorry guys, it's super long):
Executing tasks: [:app:clean, :app:generateDevAmazonDebugSources, :app:generateDevAmazonDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDevAmazonDebugUnitTestDependencies, :app:assembleDevAmazonDebug]
Configuration on demand is an incubating feature.
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build UP-TO-DATE
Generating assets binaries
Incremental java compilation is an incubating feature.
Cleaning project...
:app:clean
:app:processAssets
:app:copyFiles
:app:preBuild
:app:preDevAmazonDebugBuild
:app:checkDevAmazonDebugManifest
:app:preDevAmazonReleaseBuild
:app:preDevGoogleDebugBuild
:app:preDevGoogleReleaseBuild
:app:preProdAmazonDebugBuild
:app:preProdAmazonReleaseBuild
:app:preProdGoogleDebugBuild
:app:preProdGoogleReleaseBuild
:app:prepareComAndroidSupportAppcompatV72311Library
:app:prepareComAndroidSupportCardviewV72320Library
:app:prepareComAndroidSupportMediarouterV72220Library
:app:prepareComAndroidSupportMultidex100Library
:app:prepareComAndroidSupportRecyclerviewV72311Library
:app:prepareComAndroidSupportSupportV42320Library
:app:prepareComBatchAndroidBatchSdk153Library
:app:prepareComCrashlyticsSdkAndroidAnswers136Library
:app:prepareComCrashlyticsSdkAndroidBeta114Library
:app:prepareComCrashlyticsSdkAndroidCrashlytics255Library
:app:prepareComCrashlyticsSdkAndroidCrashlyticsCore238Library
:app:prepareComCrashlyticsSdkAndroidCrashlyticsNdk112Library
:app:prepareComFacebookAndroidFacebookAndroidSdk4101Library
:app:prepareComGoogleAndroidExoplayerExoplayerR142Library
:app:prepareComGoogleAndroidGmsPlayServices780Library
:app:prepareComGoogleAndroidGmsPlayServicesAds780Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics780Library
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing780Library
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite780Library
:app:prepareComGoogleAndroidGmsPlayServicesAppstate780Library
:app:prepareComGoogleAndroidGmsPlayServicesBase780Library
:app:prepareComGoogleAndroidGmsPlayServicesCast780Library
:app:prepareComGoogleAndroidGmsPlayServicesDrive780Library
:app:prepareComGoogleAndroidGmsPlayServicesFitness780Library
:app:prepareComGoogleAndroidGmsPlayServicesGames780Library
:app:prepareComGoogleAndroidGmsPlayServicesGcm780Library
:app:prepareComGoogleAndroidGmsPlayServicesIdentity780Library
:app:prepareComGoogleAndroidGmsPlayServicesLocation780Library
:app:prepareComGoogleAndroidGmsPlayServicesMaps780Library
:app:prepareComGoogleAndroidGmsPlayServicesNearby780Library
:app:prepareComGoogleAndroidGmsPlayServicesPanorama780Library
:app:prepareComGoogleAndroidGmsPlayServicesPlus780Library
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet780Library
:app:prepareComGoogleAndroidGmsPlayServicesVision780Library
:app:prepareComGoogleAndroidGmsPlayServicesWallet780Library
:app:prepareComGoogleAndroidGmsPlayServicesWearable780Library
:app:prepareComMopubMopubSdk440Library
:app:prepareComZendeskBelvedere1011Library
:app:prepareComZendeskSdk1512Library
:app:prepareComZendeskSdkProviders1512Library
:app:prepareIoBranchSdkAndroidLibrary1112Library
:app:prepareIoFabricSdkAndroidFabric1310Library
:app:prepareDevAmazonDebugDependencies
:app:compileDevAmazonDebugAidl
:app:compileDevAmazonDebugRenderscript
:app:generateDevAmazonDebugBuildConfig
:app:generateDevAmazonDebugAssets UP-TO-DATE
:app:mergeDevAmazonDebugAssets
:app:processDevAmazonDebugManifest
:app:fabricGenerateResourcesDevAmazonDebug
:app:generateDevAmazonDebugResValues UP-TO-DATE
:app:processDevAmazonDebugGoogleServices
:app:generateDevAmazonDebugResources
:app:mergeDevAmazonDebugResources
:app:processDevAmazonDebugResources
:app:generateDevAmazonDebugSources
:app:preDevAmazonDebugAndroidTestBuild
:app:prepareDevAmazonDebugAndroidTestDependencies
:app:compileDevAmazonDebugAndroidTestAidl
:app:processDevAmazonDebugAndroidTestManifest
:app:compileDevAmazonDebugAndroidTestRenderscript
:app:generateDevAmazonDebugAndroidTestBuildConfig
:app:generateDevAmazonDebugAndroidTestAssets UP-TO-DATE
:app:mergeDevAmazonDebugAndroidTestAssets
:app:generateDevAmazonDebugAndroidTestResValues UP-TO-DATE
:app:generateDevAmazonDebugAndroidTestResources
:app:mergeDevAmazonDebugAndroidTestResources
:app:processDevAmazonDebugAndroidTestResources
:app:generateDevAmazonDebugAndroidTestSources
:app:mockableAndroidJar UP-TO-DATE
:app:preDevAmazonDebugUnitTestBuild
:app:prepareDevAmazonDebugUnitTestDependencies
:app:javahBuild_ClassA
:app:javahBuild_ClassB
Error: package com.adjust.sdk does not exist
Error: package com.adjust.sdk does not exist
Error: package com.amazon.ags.api does not exist
Error: package com.batch.android does not exist
Error: package com.batch.android does not exist
Error: package com.crashlytics.android does not exist
Error: package com.crashlytics.android.answers does not exist
Error: package com.crashlytics.android.answers does not exist
Error: package com.crashlytics.android.answers does not exist
Error: package com.mopub.common does not exist
Error: package com.zendesk.sdk.feedback.impl does not exist
Error: package com.zendesk.sdk.model.access does not exist
Error: package com.zendesk.sdk.model.access does not exist
Error: package com.zendesk.sdk.model.push does not exist
Error: package com.zendesk.sdk.network.impl does not exist
Error: package com.zendesk.sdk.network.impl does not exist
Error: package com.zendesk.sdk.network.impl does not exist
Error: package com.zendesk.sdk.network.impl does not exist
Error: package com.zendesk.sdk.network.impl does not exist
Error: package com.zendesk.sdk.requests does not exist
Error: package com.zendesk.sdk.storage does not exist
Error: package com.zendesk.sdk.support does not exist
Error: package com.zendesk.service does not exist
Error: package com.zendesk.service does not exist
Error: package org.joda.time does not exist
Error: package org.joda.time does not exist
Error: package org.joda.time does not exist
Error: package org.joda.time does not exist
Error: package org.joda.time.format does not exist
Error: package org.joda.time.format does not exist
Error: package io.branch.indexing does not exist
Error: package io.branch.referral does not exist
Error: package io.branch.referral does not exist
Error: package io.branch.referral does not exist
Error: package io.branch.referral.util does not exist
Error: package io.branch.referral.util does not exist
Error: package com.adjust.sdk does not exist
Error: package com.amazon.ags.api does not exist
Error: package com.amazon.ags.api does not exist
Error: package com.amazon.ags.api does not exist
Error: package com.amazon.ags.api does not exist
Error: package com.applovin.sdk does not exist
Error: package com.batch.android does not exist
Error: package com.crashlytics.android does not exist
Error: package com.crashlytics.android.ndk does not exist
Error: package io.branch.referral does not exist
Error: package io.branch.referral does not exist
Error: package io.fabric.sdk.android does not exist
Error: package com.google.android.gms.analytics does not exist
Error: package com.google.android.gms.analytics does not exist
Error: package com.google.android.gms.analytics does not exist
Error: package com.google.android.gms.ads.identifier does not exist
Error: package com.google.android.gms.common does not exist
Error: package com.mopub.common does not exist
Error: package com.mopub.common does not exist
Error: cannot find symbol
symbol: class MoPubErrorCode
location: package com.mopub.mobileads
Error: cannot find symbol
symbol: class MoPubRewardedVideoListener
location: package com.mopub.mobileads
Error: package com.chartboost.sdk does not exist
Error: package com.adjust.sdk does not exist
Error: package com.adjust.sdk does not exist
Error: package com.adjust.sdk does not exist
Error: package com.adjust.sdk does not exist
Error: cannot find symbol
symbol: class BaseZendeskFeedbackConfiguration
location: class my.super.project.Renderer
Error: cannot find symbol
symbol: class BuildConfig
location: package my.super.project
Error: cannot find symbol
symbol: class Tracker
location: class my.super.project.Main
Error: ';' expected
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook does not exist
Error: package com.facebook.appevents does not exist
Error: package com.facebook.login does not exist
Error: package com.facebook.login does not exist
Error: package com.facebook.share.model does not exist
Error: package com.facebook.share.model does not exist
Error: package com.facebook.share.model does not exist
Error: package com.facebook.share.widget does not exist
Error: package com.facebook.share.widget does not exist
Error: package com.facebook.share.widget does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j does not exist
Error: package twitter4j.auth does not exist
Error: cannot find symbol
symbol: class R
location: package my.super.project
Error: cannot find symbol
symbol: class AmazonGamesClient
location: class my.super.project.Main
Error: cannot find symbol
symbol: class MoPubRewardedVideoListener
location: class my.super.project.Main
Error: cannot find symbol
symbol: class ChartBoostDelegate
location: class my.super.project.Main
Error: cannot find symbol
symbol: class CallbackManager
location: class my.super.project.ClassA
Error: cannot find symbol
symbol: class ProfileTracker
location: class my.super.project.ClassA
FAILED
FAILURE: Build failed with an exception.
My build.gradle has the following tasks:
android {
<snip>
['Main', 'Renderer', 'ClassA', 'ClassB'].each {
def targetName ->
tasks.create(name: "javahBuild_$targetName", type: Exec) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
String sdkDir = properties.getProperty('sdk.dir')
String flavorFolder = getCurrentFlavorFolder()
commandLine 'javah', '-classpath', "libs/:src/main/java/:$sdkDir/platforms/android-23/android.jar:build/intermediates/classes/$flavorFolder/$config:$sdkDir/platforms/android-23/optional/org.apache.http.legacy.jar/:$config/", '-d', 'src/main/jni/Main/', "my.super.project.${targetName}"
}
}
task javahBuildAll(dependsOn: tasks.matching { Task task -> task.name.startsWith("javahBuild_") })
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn javahBuildAll
}
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2#aar') {
transitive = true
}
compile('com.mopub:mopub-sdk:4.4.0#aar') {
transitive = true
}
compile group: 'com.zendesk', name: 'sdk', version: '1.5.1.2'
compile('com.android.support:multidex:1.0.0')
compile('com.google.android.gms:play-services:7.8.0')
compile('com.google.android.gms:play-services-analytics:7.8.0')
compile('com.google.android.gms:play-services-gcm:7.8.0')
compile('com.android.support:appcompat-v7:23.1.0')
compile('com.android.support:support-v4:23.1.0')
compile('com.facebook.android:facebook-android-sdk:4.10.+')
compile('io.branch.sdk.android:library:1.+')
compile('com.batch.android:batch-sdk:1.5+')
compile('com.adjust.sdk:adjust-android:4.2.3')
compile('joda-time:joda-time:2.9.2')
}
OK it didn't understand why I'm getting those errors but I just realized I could ignore them since the C++ header files are still getting generated.
So I decide to modify my javah gradle task to ignore errors and write those into a dedicated log file. I've added the following line:
errorOutput = project.file("build/javah_error_${targetName}.log").newDataOutputStream()
ignoreExitValue = true
My javah task now looks like this:
['Main', 'Renderer', 'ClassA', 'ClassB'].each {
def targetName ->
tasks.create(name: "javahBuild_$targetName", type: Exec) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
String sdkDir = properties.getProperty('sdk.dir')
String flavorFolder = getCurrentFlavorFolder()
errorOutput = project.file("build/javah_error_${targetName}.log").newDataOutputStream()
ignoreExitValue = true
commandLine 'javah', '-classpath', "libs/:src/main/java/:$sdkDir/platforms/android-23/android.jar:build/intermediates/classes/$flavorFolder/$config:$sdkDir/platforms/android-23/optional/org.apache.http.legacy.jar/:$config/", '-d', 'src/main/jni/Main/', "my.super.project.${targetName}"
}
}
After multiple hours of searching, researching, trial and error, and other things, I’ve finally got it.
javah is gone, one must use javac […] -h <destdir> […] now.
I already had the following snippet in my top-level build.gradle (not the one under app/ or so!) to add javac arguments…
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all"
}
… and “just” had to extend that. (This section goes into the allprojects { block which you already have in your top-level build.gradle, I put it after the repositories { […] } block.)
In my case, I merely wanted to let the .h files be created but not actively #include them in the C code (because I use the RegisterNatives method to register my functions), which would be… tricky, as one would additionally to this have to:
figure out which of the (possibly multiple) tasks should create the .h files used in the actual build
give that a stable pathname
add that path to the include directories in the native build (again tricky)
For mere manual introspection, I just add the javac -h <destdir> option to all javac invocations, creating per-task result directories, and then just look at them in Midnight Commander:
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all"
options.getHeaderOutputDirectory().value(project.layout.buildDirectory.dir("headers/" + getName()))
}
(The compilerArgs change is, of course, copied unchanged from the above.)
I've recently reinstalled my Haskell environment as I thought I had hosed it beyond recovery after updating my Mac OS X to Mavericks.
Now every time I run cabal install cabal-install, I get the following error.
Resolving dependencies...
Configuring cabal-install-1.18.0.3...
/var/folders/4l/qbdvy5xj4q53skv0zn0lhw940000gp/T/8247.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Building cabal-install-1.18.0.3...
Preprocessing executable 'cabal' for cabal-install-1.18.0.3...
Main.hs:118:8:
Could not find module `Distribution.Version'
There are files missing in the `Cabal-1.18.1.3' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
Failed to install cabal-install-1.18.0.3
cabal: Error: some packages failed to install:
cabal-install-1.18.0.3 failed during the building phase. The exception was:
ExitFailure 1
Abes-MacBook-Pro:artifact abe$ cabal install cabal-install
Resolving dependencies...
Configuring cabal-install-1.18.0.3...
/var/folders/4l/qbdvy5xj4q53skv0zn0lhw940000gp/T/8335.c:1:12:
warning: control reaches end of non-void function [-Wreturn-type]
int foo() {}
^
1 warning generated.
Building cabal-install-1.18.0.3...
Preprocessing executable 'cabal' for cabal-install-1.18.0.3...
Main.hs:118:8:
Could not find module `Distribution.Version'
There are files missing in the `Cabal-1.18.1.3' package,
try running 'ghc-pkg check'.
Use -v to see a list of the files searched for.
Failed to install cabal-install-1.18.0.3
cabal: Error: some packages failed to install:
cabal-install-1.18.0.3 failed during the building phase. The exception was:
ExitFailure 1
After googling around, I've found this: http://www.haskell.org/platform/ghc-clang-wrapper
Which I ran to wrap clang for Haskell, however the above error still occurs.
running ghc-pkg check
There are problems in package Cabal-1.18.1.3:
Warning: library-dirs: /Users/abe/Library/Haskell/ghc-7.6.3/lib/Cabal-1.18.1.3/lib doesn't exist or isn't a directory
Warning: haddock-interfaces: /Users/abe/Library/Haskell/ghc-7.6.3/lib/Cabal-1.18.1.3/doc/html/Cabal.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/abe/Library/Haskell/ghc-7.6.3/lib/Cabal-1.18.1.3/doc/html doesn't exist or isn't a directory
import-dirs: /Users/abe/Library/Haskell/ghc-7.6.3/lib/Cabal-1.18.1.3/lib doesn't exist or isn't a directory
file Distribution/Compat/Environment.hi is missing
file Distribution/Compat/Exception.hi is missing
file Distribution/Compat/ReadP.hi is missing
file Distribution/Compiler.hi is missing
file Distribution/InstalledPackageInfo.hi is missing
file Distribution/License.hi is missing
file Distribution/Make.hi is missing
file Distribution/ModuleName.hi is missing
file Distribution/Package.hi is missing
file Distribution/PackageDescription.hi is missing
file Distribution/PackageDescription/Check.hi is missing
file Distribution/PackageDescription/Configuration.hi is missing
file Distribution/PackageDescription/Parse.hi is missing
file Distribution/PackageDescription/PrettyPrint.hi is missing
file Distribution/PackageDescription/Utils.hi is missing
file Distribution/ParseUtils.hi is missing
file Distribution/ReadE.hi is missing
file Distribution/Simple.hi is missing
file Distribution/Simple/Bench.hi is missing
file Distribution/Simple/Build.hi is missing
file Distribution/Simple/Build/Macros.hi is missing
file Distribution/Simple/Build/PathsModule.hi is missing
file Distribution/Simple/BuildPaths.hi is missing
file Distribution/Simple/BuildTarget.hi is missing
file Distribution/Simple/CCompiler.hi is missing
file Distribution/Simple/Command.hi is missing
file Distribution/Simple/Compiler.hi is missing
file Distribution/Simple/Configure.hi is missing
file Distribution/Simple/GHC.hi is missing
file Distribution/Simple/Haddock.hi is missing
file Distribution/Simple/Hpc.hi is missing
file Distribution/Simple/Hugs.hi is missing
file Distribution/Simple/Install.hi is missing
file Distribution/Simple/InstallDirs.hi is missing
file Distribution/Simple/JHC.hi is missing
file Distribution/Simple/LHC.hi is missing
file Distribution/Simple/LocalBuildInfo.hi is missing
file Distribution/Simple/NHC.hi is missing
file Distribution/Simple/PackageIndex.hi is missing
file Distribution/Simple/PreProcess.hi is missing
file Distribution/Simple/PreProcess/Unlit.hi is missing
file Distribution/Simple/Program.hi is missing
file Distribution/Simple/Program/Ar.hi is missing
file Distribution/Simple/Program/Builtin.hi is missing
file Distribution/Simple/Program/Db.hi is missing
file Distribution/Simple/Program/Find.hi is missing
file Distribution/Simple/Program/GHC.hi is missing
file Distribution/Simple/Program/HcPkg.hi is missing
file Distribution/Simple/Program/Hpc.hi is missing
file Distribution/Simple/Program/Ld.hi is missing
file Distribution/Simple/Program/Run.hi is missing
file Distribution/Simple/Program/Script.hi is missing
file Distribution/Simple/Program/Types.hi is missing
file Distribution/Simple/Register.hi is missing
file Distribution/Simple/Setup.hi is missing
file Distribution/Simple/SrcDist.hi is missing
file Distribution/Simple/Test.hi is missing
file Distribution/Simple/UHC.hi is missing
file Distribution/Simple/UserHooks.hi is missing
file Distribution/Simple/Utils.hi is missing
file Distribution/System.hi is missing
file Distribution/TestSuite.hi is missing
file Distribution/Text.hi is missing
file Distribution/Verbosity.hi is missing
file Distribution/Version.hi is missing
file Language/Haskell/Extension.hi is missing
file Distribution/Compat/CopyFile.hi is missing
file Distribution/Compat/TempFile.hi is missing
file Distribution/GetOpt.hi is missing
file Distribution/Simple/GHC/IPI641.hi is missing
file Distribution/Simple/GHC/IPI642.hi is missing
file Paths_Cabal.hi is missing
cannot find libHSCabal-1.18.1.3.a on library path
Warning: haddock-interfaces: /Library/Haskell/ghc-7.6.3/lib/haskell-platform-2013.2.0.0/doc/html/haskell-platform.haddock doesn't exist or isn't a file
Warning: haddock-html: /Library/Haskell/ghc-7.6.3/lib/haskell-platform-2013.2.0.0/doc/html doesn't exist or isn't a directory
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
Cabal-1.18.1.3
Why is my Haskell environment so phenomenally broken? And how can I fix it?
One approach is to remove your local ghc package cache:
$ cd ~/.ghc/ && rm -rf */package.conf.d
$ ghc-pkg --user recache
After you do this, try the cabal command again.
$ cabal install package-name
That should work. If it doesn't, try removing your cabal packages, then repeating the above steps:
$ rm -rf ~/.cabal
If you're still having trouble, the missing package may be referred to by the system ghc package cache. Run this command:
$ ghc-pkg --user recache
$ sudo ghc-pkg recache
$ ghc-pkg -v check
The last command should print the system cache. On my GNU/Linux sytem, it prints this:
using cache: /home/sudoman/.ghc/x86_64-linux-7.6.3/package.conf.d/package.cache
using cache: /var/lib/ghc/package.conf.d/package.cache
At that point, I don't have a solution for you based on experience, but you may want to consider removing the ghc system package cache like above, then doing a recache; or re-installing ghc/haskell-platform.
the problem stems from the fact that cabal can track multiple versions of the same package.
Running:
cabal install --reinstall Cabal-1.18.1.3
fixes the problem
I want to install php_gtk on Fedora 17.
I've downloaded php-gtk-2.0.1 and tried to install it. Then I've done this:
./buildconf
./configure
make
After the make command, the following error appeared:
In file included from /home/n/Downloads/php-gtk-2.0.1/./ext/gtk+/php_gtk+.c:23:0:
/home/n/Downloads/php-gtk-2.0.1/main/php_gtk.h:307:64: error: unknown type name 'function_entry'
In file included from /home/n/Downloads/php-gtk-2.0.1/./ext/gtk+/php_gtk+.c:23:0:
/home/n/Downloads/php-gtk-2.0.1/main/php_gtk.h:308:68: error: unknown type name 'function_entry'
In file included from /home/n/Downloads/php-gtk-2.0.1/./ext/gtk+/php_gtk+.c:23:0:
/home/n/Downloads/php-gtk-2.0.1/main/php_gtk.h:490:64: error: unknown type name 'function_entry'
In file included from /home/n/Downloads/php-gtk-2.0.1/./ext/gtk+/php_gtk+.c:23:0:
/home/n/Downloads/php-gtk-2.0.1/main/php_gtk.h:506:66: error: unknown type name 'function_entry'
make: *** [ext/gtk+/php_gtk+.lo] Error 1
How can I solve this problem?
You need to change function_entry to zend-function_entry if you have php-5.4
But you may discover other problems, if this is resolved.