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

macOS installed headers include non-existing files (e.g. <iODBC/sqltypes.h>) #92

Open
PerMildner opened this issue Oct 9, 2023 · 5 comments
Assignees

Comments

@PerMildner
Copy link

Running the installer ODBC-SDK-3.52.16-macOS11.dmg (on macOS 12.7 Intel) creates header files in /Library/Frameworks/iODBC.framework/Versions/3.52/Headers/.

The installed headers, e.g. sql.h contain include statements like:
#include <iODBC/sqltypes.h>
This will not work, since there is no iODBC directory.

The effect is that it is not possible to compile against the installed header files, making the macOS installer unusable.

Since the including files and the files they attempt to include are all in the same directory, one possible fix is to replace any occurrence of #include <iODBC/some_file.h> with #include "some_file.h", i.e. without "system-brackets" and without referring to the missing directory iODBC.

This is an old bug, and has been reported before.

@PerMildner
Copy link
Author

Update: I now notice that the headers installed in /usr/local/iODBC/include/ does not use the indirection via iODBC (but still use the "system-brackets", which seems fishy unless it is intentional that /usr/local/iODBC/include/sqlext.h should be able to include some other "system version" of sql.h than the one in /usr/local/iODBC/include/).

@PerMildner
Copy link
Author

(I looked for details about how to use the headers in Developing ODBC Compliant Applications but it does not provide any such details and seems quite dated.)

@pkleef pkleef self-assigned this Oct 9, 2023
@pkleef
Copy link
Collaborator

pkleef commented Oct 9, 2023

I will have a look and report back to you...

@PerMildner
Copy link
Author

The workaround we used before to be able to use cc ... -I /Library/Frameworks/iODBC.framework/Versions/3.52/Headers was to do the following after installation:

cd /Library/Frameworks/iODBC.framework/Versions/3.52/Headers && sudo ln -s . iODBC

i.e. create a symbolic link so iODBC/*.h can be found.
I think we could also use cc ... -I/usr/local/iODBC/include since those headers does not try to use a iODBC directory.

@PerMildner
Copy link
Author

PerMildner commented Oct 9, 2023

This is more or less a duplicate of issue #17. As a result of that the /usr/local/iODBC/include files have been fixed (to avoid iODBC), so they can be used which makes them the proper include files for a UNIX-style build on macOS.

(Some documentation on how to build against the installed iODBC on macOS would be nice, though).

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

2 participants