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

Issue with installation #53

Open
rashmi1403 opened this issue Apr 3, 2015 · 9 comments
Open

Issue with installation #53

rashmi1403 opened this issue Apr 3, 2015 · 9 comments

Comments

@rashmi1403
Copy link

Hi,
I have trouble installing the FDW for MySQL.
My installation steps were as below:

  1. Installed MySQL C Connector
    2)Executed
    export PATH=/Library/PostgreSQL/9.4/bin/:$PATH
    export PATH=/usr/local/mysql/bin/:$PATH
    3)make USE_PGXS=1N

This is the error I get when I run make.

/Library/PostgreSQL/9.4/include/postgresql/server/c.h:81:10: fatal error:
'stdio.h' file not found

I uninstalled and installed many times but I am stuck at this point.

I know its not a problem related to FDW but my development environment.
However if you can point out what is it that I am not doing correctly then it would help me. I use a Mac.

Thanks!

@rashmi1403
Copy link
Author

Below is the exact error I am getting. I am using OS X 10.10

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.7 -arch i386 -arch x86_64 -I/usr/local/mysql/include -I. -I./ -I/Library/PostgreSQL/9.4/include/postgresql/server -I/Library/PostgreSQL/9.4/include/postgresql/internal -I/opt/local/20140401/include/libxml2 -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o connection.o connection.c
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'
In file included from connection.c:16:
In file included from /Library/PostgreSQL/9.4/include/postgresql/server/postgres.h:47:
/Library/PostgreSQL/9.4/include/postgresql/server/c.h:81:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.

@benmadin
Copy link

benmadin commented Apr 7, 2015

rashmi,

I'm really no expert at this, but if you are using 10.10, then I would look at the error message:

clang: warning: no such sysroot directory:     
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'

I would guess that you have an out of date path including the wrong version of the SDK?

cheers

Ben

@rashmi1403
Copy link
Author

Hi Ben,

I checked the folder and it has only
MacOSX10.9.sdk
MacOSX10.10.sdk

So I am not really sure which file is referring to this path.
The posts that I referred to spoke about editing the SDK's in the Makefile to change it to the current version. However I did not find any such reference in the mysql_fdw Makefile.

Thanks for helping!

Best,
Rashmi

@ahsanhadi
Copy link

Hi Rashmi,

Are you still facing the installation issues?

-- Ahsan

@rashmi1403
Copy link
Author

Hi Ahsan,

Yes I still have the issue. Its something to do with some variable that is not set or missing. I am not sure which one though. Any suggestion would be helpful.

Best,
Rashmi

@wafs
Copy link

wafs commented Aug 2, 2015

Issue :

The issue is not with this plugin, but Postgres itself. Postgres for some reason hasn't updated the requirement in their makefile , so when this plugin references postgres's one (which is referencing postgres's preferences) it is asking for SDK 10.8 , despite the fact that 10.9 and 10.10 are the current versions for anyone using Yosemite, and you most likely don't have 10.8 since the legacy versions aren't installed on the newer mac family of computers.

How to fix :

Download 10.8 SDK from here, and place it in the directory with the other sdks.
https://github.com/phracker/MacOSX-SDKs

I had the same issue and now I've installed it. Maybe Ahsan can add something into his makefile to check and override the constant if 10.8 doesn't exist and point it to 10.9/10 ? Otherwise it's an annoying but manual and doable fix.

@rashmi1403
Copy link
Author

Hey,

Thanks for the reply.
Can you please tell me in which directory I need to place the downloaded 10.8 SDK?

Thanks,
Rashmi

@wafs
Copy link

wafs commented Aug 4, 2015

Since your error said

'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'

That is your directory (the SDK folder).

@rashmi1403
Copy link
Author

Thanks a lot! :)

On Tue, Aug 4, 2015 at 4:09 AM, wafs notifications@github.com wrote:

Since your error said

'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'

That is your directory (the SDK folder).


Reply to this email directly or view it on GitHub
#53 (comment)
.

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

4 participants