dev-db/unixODBC-2.2.12: odbcinst utility is used to install odbc connection drivers (e.g. FreeTDS) into files odbcinst.ini, odbc.ini, and .odbc.ini as in the following command: $ odbcinst -i -d -f driverfile where driverfile contains the details of the where to find the odbc driver library e.g. FreeTDS. A prefix installation on a system with unixODBC already installed by root will use /usr/lib/libodbcinst.so rather than $EPREFIX/usr/lib/libodbcinst.so unless LD_LIBRARY_PATH is explicitly set to $EPREFIX/usr/lib or ODBCSYSINI environment variable is set to $EPREFIX/etc/unixODBC. If either of these environment variables are not set, then odbcinst -j will report /etc/* directories, and driver installation will fail. Reproducible: Always Steps to Reproduce: 1. install unixODBC as root 2. prefix emerge unixODBC 3. unset LD_LIBRARY_PATH ODBCSYSINI 4. odbcinst -i -d -f driver.temp where driver.temp is something like: [FreeTDS] Description = v0.64 with protocol v8.0 Driver = ${EPREFIX}/usr/lib/libtdsodbc.so Actual Results: odbcinst: SQLInstallDriverEx failed with Invalid install path. Expected Results: odbcinst: Driver installed. Usage count increased to 1. Target directory is ${EPREFIX}/etc/unixODBC $ odbcinst -j will report locations of the driver and system/user data sources. exe/odbcinst.c is using function odbcinst_system_file_path() which is defined in odbcinst/_odbcinst_SystemINI.c, compiled into libodbcinst.la during build, linked with odbcinst.o to produce exe/.libs/odbcinst which is ultimately installed to $EPREFIX/usr/bin/ odbcinst/_odbcinst_SystemINI.c looks for environment variable ODBCSYSINI and, if not found, reports /etc/* Note: some further debugging revealed that exe/odbcinst is an extra build-only utility that sets the LD_LIBRARY_PATH value pointing to the odbcinst/.libs/libodbcinst.so so that exe/.libs/odbcinst reports the correct odbcinst.ini locations. However, post-build, the odbcinst utility will not work correctly on its own without setting the proper environment variables.
note: ebuild compile DOES correctly use the -DSYSTEM_FILE_PATH=\"${EPREFIX}/etc/unixODBC\" define flag, which builds a correctly working odbcinst_system_file_path() in $EPREFIX/usr/lib/libodbcinst.so but maybe a better fix is to patch odbcinst/_odbcinst_SystemINI.c so that it returns "$EPREFIX/etc/unixODBC" all the time when odbcinst_system_file_path() is called.
just fyi, unixODBC-2.2.14 is in main tree now.
2.3.0 in tree, can we get a update if the problem persists?
we are directly on gx86 for this one, so what's in the main tree is in our tree
I just fixed this issue, it was because inidir was set by default, and hence not prefixed. Your example worked for me correctly now with dev-db/unixODBC-2.3.0