Skip to Content.
Sympa Menu

freetds - Re: [freetds] Failure to build on OSX

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Failure to build on OSX
  • Date: Sun, 22 Nov 2020 17:31:07 +0000

Il giorno sab 21 nov 2020 alle ore 06:46 Igor Korot <ikorot01 AT gmail.com> ha
scritto:

> Sorry, I accidentally hit "Send"...
>
> Frediano,
> Sorry for the top-posting.
> Here are my observations:
>
> The configure script requires the directory where isql.h is
>
> On my system is in:
>
> [code]
> Igors-MacBook-Air:/ igorkorot$ find . -name isql.h
> find: ./usr/sbin/authserver: Permission denied
> ./usr/local/iODBC/include/isql.h
> find: ./.Spotlight-V100: Permission denied
> find: ./Library/Application Support/Apple/ParentalControls/Users:
> Permission denied
> find: ./Library/Application Support/Apple/AssetCache/Data: Permission
> denied
> find: ./Library/Application Support/ApplePushService: Permission denied
> ./Library/Frameworks/iODBC.framework/Versions/3.52/Headers/isql.h
> [/code]
>
> And so running:
>
> [code]
> Igors-MacBook-Air:freetds igorkorot$ ./configure --enable-odbc
> --enable-debug --enable-odbc-wide --with-iodbc=/usr/local/iODBC/
> [/code]
>
> succeeded.
>
> However, running "make" after that, results in:
>
> [code]
> Making all in odbc
> /Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
> Making all in .
> CC odbc.lo
> In file included from odbc.c:38:
> In file included from ../../include/freetds/odbc.h:36:
> /usr/local/iODBC//include/isql.h:84:10: fatal error: 'iODBC/sql.h'
> file not found
> #include <iODBC/sql.h>
> ^~~~~~~~~~~~~
> 1 error generated.
> make[4]: *** [odbc.lo] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
> [/code]
>
> So, any help fixing this/properly running configure & make?
>
> Thank you.
>
>
Hi,
it looks like MacOS is pretty weird. Also the installation of iODBC is
not that coherent.
There's a iodbc-config I tried to use but is pretty useless as it uses
"normal" Unix arguments (-L, -I, etc) while
iODBC is installed using MacOS frameworks. I "solved" using these commands:

$ IODBC_CFLAGS='-I/usr/local/iODBC/include -F/Library/Frameworks -framework
iODBC -framework iODBCinst'
$ export IODBC_CFLAGS
$ IODBC_LIBS='-I/usr/local/iODBC/include -F/Library/Frameworks -framework
iODBC -framework iODBCinst'
$ export IODBC_LIBS
$ ./configure --with-iodbc

(yes, the 2 environments are duplicated)

it compiles (not currently tested) although otool -L is reporting that 2
iodbc libraries are imported (it should
import only one).

I found on the internet a discussion where somebody wrote that a patch was
in progress (in May) but I installed
last iODBC and it still has the issue.

I don't have much MacOS knowledge to suggest the final method, not sure if
this is the best way to
solve the issue.

Frediano


>
> > On Fri, Nov 20, 2020 at 3:28 AM Igor Korot <ikorot01 AT gmail.com> wrote:
> > >
> > > Hi, Frediano,
> > >
> > > On Fri, Nov 20, 2020 at 2:41 AM Frediano Ziglio <freddy77 AT gmail.com>
> wrote:
> > > >
> > > > Il giorno ven 20 nov 2020 alle ore 07:37 Igor Korot <
> ikorot01 AT gmail.com> ha
> > > > scritto:
> > > >
> > > > > Hi, (Frediano),
> > > > > I am trying to build freeTDS latest release on OSX 10.13 with the
> ODBC
> > > > > driver.
> > > > >
> > > > > I installed latest iODBC DM and then tried building.
> > > > >
> > > > > The log is below:
> > > > >
> > > > > [code]
> > > > > Igors-MacBook-Air:freetds igorkorot$ ./configure --enable-odbc
> > > > > --enable-debug --enable-odbc-wide --with-iodbc && make
> > > > > checking for a BSD-compatible install... /usr/bin/install -c
> > > > > checking whether build environment is sane... yes
> > > > > checking for a thread-safe mkdir -p... ./install-sh -c -d
> > > > > checking for gawk... no
> > > > > checking for mawk... no
> > > > > checking for nawk... no
> > > > > checking for awk... awk
> > > > > checking whether make sets $(MAKE)... yes
> > > > > checking whether make supports nested variables... yes
> > > > > checking whether make supports nested variables... (cached) yes
> > > > > checking for gawk... (cached) awk
> > > > > checking for grep that handles long lines and -e... /usr/bin/grep
> > > > > checking whether ln -s works... yes
> > > > > checking for a sed that does not truncate output... /usr/bin/sed
> > > > > checking for pkg-config... no
> > > > >
> > > >
> > > > That's not expected. Weird on a new system, but maybe is just that I
> have
> > > > Brew installed.
> > >
> > > Probably.
> > > I rather prefer to install official packages and not from HB.
> > >
> > > Just grabbed it from iodbc.org...
> > >
> > > >
> > > >
> > > > > checking build system type... x86_64-apple-darwin17.7.0
> > > > > checking host system type... x86_64-apple-darwin17.7.0
> > > > > checking whether make supports the include directive... yes (GNU
> style)
> > > > > checking for gcc... gcc
> > > > >
> > > >
> > > > ... omissis ...
> > > >
> > > > checking compile-time options
> > > > > checking for IODBC... no
> > > > > configure: error: in `/Users/igorkorot/freetds':
> > > > > configure: error: The pkg-config script could not be found or is
> too
> > > > > old. Make sure it
> > > > > is in your PATH or set the PKG_CONFIG environment variable to the
> full
> > > > > path to pkg-config.
> > > > >
> > > >
> > > > That is the result of not founding pkg-config previously
> > >
> > > Correct.
> > >
> > > >
> > > >
> > > > > Alternatively, you may set the environment variables IODBC_CFLAGS
> > > > > and IODBC_LIBS to avoid the need to call pkg-config.
> > > > >
> > > >
> > > > That's a workaround. Or you could try using --with-idobc=<directory>
> > > > instead.
> > >
> > > I don't know what flags that library was built with...
> > >
> > > >
> > > > In configure.ac:
> > > >
> > > > # The user asked for iodbc support, but didn't tell us
> > > > # where to look. So, we'll try to get the info from
> > > > # pkg-config. If we can't, we'll display an error.
> > > > PKG_CHECK_MODULES(IODBC, libiodbc)
> > > >
> > > > so the configure it's behaving as expected (although it could try a
> bit
> > > > harder).
> > >
> > > ... so I should use the path to libiodbc, right?
> > >
> > > >
> > > >
> > > > > See the pkg-config man page for more details.
> > > > >
> > > > > To get pkg-config, see <http://pkg-config.freedesktop.org/>.
> > > > > See `config.log' for more details
> > > > > Igors-MacBook-Air:freetds igorkorot$
> > > > > [/code]
> > > > >
> > > > > I can successfully run the iODBC GUI.
> > > > >
> > > > > So what is going on?
> > > > >
> > > > > Thank you.
> > > > >
> > > >
> > > > I'll check my MacOS to see where pkg-config is and where the include
> files
> > > > are.
> > >
> > > Maybe the install is different if its downloaded from iodbc.org?
> > >
> > > Thank you.
> > >
> > > >
> > > > Frediano
> > > > _______________________________________________
> > > > FreeTDS mailing list
> > > > FreeTDS AT lists.ibiblio.org
> > > > https://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page