Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 629
    • Merge requests 629
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1975
Closed
Open
Issue created Dec 12, 2007 by judah@trac-judah

GHC cc phase doesn't add -framework-path flags

When compiling a C file with ghc, framework search paths (-framework-path) are not passed to gcc. For example, compiling the test file rl.c with GNUreadline.framework stored in $HOME/Library/Frameworks:

$ cat rl.c 
#include <stdio.h>
#include <GNUreadline/readline/readline.h>

int main(void) {
    char *line = readline("Enter a line: ");
    if (line) printf("Line was:%s\n",line);
    return 0;
}
$ gcc -F$HOME/Library/Frameworks -framework GNUreadline rl.c
$ ghc -framework-path $HOME/Library/Frameworks -framework GNUreadline rl.c

rl.c:2:43:
     error: GNUreadline/readline/readline.h: No such file or directory
rl.c: In function 'main':

rl.c:5:0:  warning: implicit declaration of function 'readline'

rl.c:5:0:
     warning: initialization makes pointer from integer without a cast

This bug was found by Christian Maeder when creating a potential fix for #1395 (closed). Discussion in that task is revolving around making GHC add $HOME/Library/Frameworks automatically; but regardless of that task's resolution, we should fix the above behavior.

Trac metadata
Trac field Value
Version 6.8.1
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking