Missing glib/gobject when compiling

Edward Bridges ebridges at eqbridges.com
Sat Nov 11 06:18:24 EST 2017


On Fri, Nov 10, 2017, at 10:42 PM, John Ralls wrote:
> 
> 
>> On Nov 10, 2017, at 7:06 PM, Edward Bridges
>> <ebridges at eqbridges.com> wrote:>> 
>> On Thu, Nov 9, 2017, at 11:16 PM, John Ralls wrote:
>>> 
>>> 
>>>> On Nov 9, 2017, at 6:07 PM, Edward Bridges
>>>> <ebridges at eqbridges.com> wrote:>> 
>>>> On Wed, Nov 8, 2017, at 11:00 PM, John Ralls wrote:
>>>>> 
>>>>> 
>>>>>> On Nov 8, 2017, at 6:57 PM, Edward Bridges
>>>>>> <ebridges at eqbridges.com> wrote:>> 
>>>>>> On Wed, Nov 8, 2017, at 09:59 AM, John Ralls wrote:
>>>>>>> 
>>>>>>> 
>>>>>>>> On Nov 7, 2017, at 8:42 PM, Edward Bridges
>>>>>>>> <ebridges at eqbridges.com>>>>>>> wrote:>>>> 
>>>>>>>> On Tue, Nov 7, 2017, at 10:26 AM, John Ralls wrote:
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> On Nov 6, 2017, at 6:27 PM, Edward Bridges
>>>>>>>>>> <ebridges at eqbridges.com> wrote:>>>>>> 
>>>>>>>>>> On Mon, Nov 6, 2017, at 08:40 PM, Edward Bridges wrote:
>>>>>>>>>>> 
>>>>>>>>>>> On Sun, Nov 5, 2017, at 10:39 PM, John Ralls wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>>> On Nov 5, 2017, at 6:07 PM, Edward Bridges
>>>>>>>>>>>>> <ebridges at eqbridges.com> wrote:>>>>>>>>> 
>>>>>>>>>>>>> I've built libdbdpgsql.so using jhbuild build libdbi-
>>>>>>>>>>>>> drivers,>>>>>>>>>>> then run:>>>>>>>>> 
>>>>>>>>>>>>> cp gnucash-stable/lib/dbd/libdbdpgsql.so \
>>>>>>>>>>>>>  /Applications/Gnucash.app/Contents/Resources/lib/dbd
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>> install_name_tool -change gnucash-
>>>>>>>>>>>>> stable/lib/libdbi.1.dylib>>>>>>>>>>>>> \>>>>>>>>>   /Applications/Gnucash.app/Contents/Resources/l->>>>>>>>>>>>> ib/libdbi.1.d->>>>>>>>>>>   ylib \>>>>>>>>>   /Applications/Gnucash.app/Contents/Reso->>>>>>>>>>>>>  urces/lib/dbd/libdbd->>>>>>>>>>>   pgsql.so>>>>>>>>> 
>>>>>>>>>>>>> I'm assuming that, then, when I start up Gnucash (v2.6.15)
>>>>>>>>>>>>> I>>>>>>>>>>> would have>>>>>>>>> the>>>>>>>>>>>>> option to "Save As..." to a Postgresql database option
>>>>>>>>>>>>> under>>>>>>>>>>> "Data>>>>>>>>> Format">>>>>>>>>>>>> but it's not appearing, and am not seeing any logs under
>>>>>>>>>>>>> Console.>>>>>>>>> 
>>>>>>>>>>>>> Thanks for your quick response earlier.  Am I missing a
>>>>>>>>>>>>> step>>>>>>>>>>> somewhere>>>>>>>>> here?>>>>>>>>>>>> 
>>>>>>>>>>>> I think you also need the pgsql client dylib in the bundle>>>>>>>>>>>> and>>>>>>>>>> it would>>>>>>>> be better to use
>>>>>>>>>>>> @executable_path/../Resources/lib/libdbi.1.dylib
>>>>>>>>>>>> rather>>>>>>>> than /Applications/Gnucash.app/Contents as
>>>>>>>>>>>> that will allow you>>>>>>>>>> to move>>>>>>>> the bundle.
>>>>>>>>>>>> 
>>>>>>>>>>>> Use `otool -L
>>>>>>>>>>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdb-
>>>>>>>>>>>> dp->>>>>>>>>>>> gs->>>>>>>>>> ql.so` to>>>>>>>> make sure that your
>>>>>>>>>>>> install_name_tool>>>>>>>>>>>> invocation did what you>>>>>>>>>> want. I’m>>>>>>>>
>>>>>>>>>>>> suspicious of the relative path in your>>>>>>>>>>>> install_name_tool>>>>>>>>>> invocation.>>>>>>>> 
>>>>>>>>>>>> Console doesn’t catch stderr anymore and hasn’t since Lion>>>>>>>>>>>> (10.7). You>>>>>>>> can check the trace file (`sudo find
>>>>>>>>>>>>      /var/private/Temp -name>>>>>>>>>> gnucash.trace` to
>>>>>>>>>>>>      get the path) but link errors might not get>>>>>>>>>>
>>>>>>>>>>>>      into there>>>>>>>> either, so best to run GnuCash from
>>>>>>>>>>>>      a>>>>>>>>>>>> Terminal session:>>>>>>>>>>
>>>>>>>>>>>> /Applications/Gnucash.app/Contents/MacOS/Gnucash>>>>>>>>>>>> so the stderr output goes where you can see it.
>>>>>>>>>>>> 
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> John Ralls
>>>>>>>>>>> 
>>>>>>>>>>> Hi John --
>>>>>>>>>>> 
>>>>>>>>>>> Thanks for your help on this.  
>>>>>>>>>>> 
>>>>>>>>>>> When I run according to your instructions I get a brief
>>>>>>>>>>> error>>>>>>>>> message>>>>>>> that libdbi is unable to load
>>>>>>>>>>> the driver -- and>>>>>>>>>>> message>>>>>>> it still is not>>>>>>>>> working>>>>>>> (see
>>>>>>>>>>> message>>>>>>> below).  I could not find a gnucash.trace>>>>>>>>>>> working>>>>>>> file under /var>>>>>>>>> as well.>>>>>>> 
>>>>>>>>>>> ```
>>>>>>>>>>> ~ $ /Applications/Gnucash.app/Contents/MacOS/Gnucash
>>>>>>>>>>> Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash-
>>>>>>>>>>> >>>>>>>>> bin>>>>>>>>>>>>>>>>>> (process:4934): gnc.gui-WARNING **: [mac_set_languages()]
>>>>>>>>>>> Language list:>>>>>>> en:en_US:C
>>>>>>>>>>> (null)
>>>>>>>>>>> libdbi: Failed to load driver:
>>>>>>>>>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbd-
>>>>>>>>>>> pg->>>>>>>>>>> sq->>>>>>>>> l.so>>>>>>> ^C
>>>>>>>>>>> 
>>>>>>>>>>> ~ $ otool -L
>>>>>>>>>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbd-
>>>>>>>>>>> pg->>>>>>>>>>> sq->>>>>>>>> l.so>>>>>>> /Applications/Gnucash.app/Contents/Resources/lib/->>>>>>>>>>>  dbd/libdbdpgsq->>>>>>>>> l.so:>>>>>>> /Users/gnucash/gnucash-
>>>>>>>>>>>  stable/lib/libpq.5.dylib>>>>>>>>>>>  (compatibility>>>>>>>>> version 5.0.0, current version
>>>>>>>>>>>  5.9.0)>>>>>>>>>>> /Users/gnucash/gnucash-stable/lib/libdbi.1.dylib
>>>>>>>>>>> (compatibility>>>>>>> version 3.0.0, current version
>>>>>>>>>>> 3.0.0)>>>>>>>>> /usr/lib/libSystem.B.dylib (compatibility
>>>>>>>>>>> version 1.0.0,>>>>>>>>>>> current>>>>>>> version 1252.0.0)>>>>>>>>> ```
>>>>>>>>>>> 
>>>>>>>>>>> Cheers, 
>>>>>>>>>>> Ed
>>>>>>>>>> 
>>>>>>>>>> Just noticed that `otool` is reporting that `libdbdpgsql.so`>>>>>>>>>> under>>>>>> /Applications/Guncash.app is depending on
>>>>>>>>>> under>>>>>> `libdbi`>>>>>>>>>> under>>>>>> and `libpq`>>>>>>>> that live under the `gnucash`
>>>>>>>>>> under>>>>>> user home directory (i.e. that>>>>>>>>>> were>>>>>>>> built>>>>>> along with libdbdpgsql.
>>>>>>>>>> 
>>>>>>>>>> That may explain the failure to load the shared library (as
>>>>>>>>>> the>>>>>>>> user I>>>>>> ran>>>>>>>>>> Gnucash as does not have access to the gnucash user home
>>>>>>>>>> directory).>>>>>> 
>>>>>>>>>> However, I tried running it as root as well, and still get
>>>>>>>>>> the>>>>>>>> same>>>>>> error>>>>>>>>>> message.
>>>>>>>>> 
>>>>>>>>> What does `file /Applications/Gnucash.app/Contents/Resources/lib/-
>>>>>>>>> >>>>>>> dbd/libdbdpgsql.so` return?>>>>>>>>>>>>>> Regards,
>>>>>>>>> John Ralls
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> It returns:
>>>>>>>> 
>>>>>>>> /Applications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgs-
>>>>>>>> ql->>>>>>>> .s->>>>>> o[1]: Mach-O 64-bit bundle x86_64>>> That’s the
>>>>>>>> problem:> 
> 
> 
> Did you do this part first?
> 
>>>>>>>>      Everything else is 32-bit. Change the>>>>> setup_sdk()
>>>>>>>>      call in ~/.jhbuildrc-custom to>>>>>>>>>> setup_sdk(architectures=[‘i386’])>>>>> and rebuild everything.
>                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> 
> Regards,
> John Ralls
> 
> 
> 
> 
> 
>>>>>>> 
>>>>>>> Another issue: Be sure to run
>>>>>>>  install_name_tool -change /Users/gnucash/gnucash-
>>>>>>>  stable/lib/libdbi.1.dylib \>>>
>>>>>>>  @executable_path/../Resources/lib/libdbi.1.dylib \>>>>>   /App-
>>>>>>>  lications/Gnucash.app/Contents/Resources/lib/dbd/libdbdpgsq-
>>>>>>>  >>>>>   l.so>>>>>>>>>> (That’s all one command, note the ‘\’ at the end of the first
>>>>>>> two>>>>> lines) so that GnuCash and libdbdpgsql are using the
>>>>>>> same instance>>>>> of the library; weird memory errors are
>>>>>>> likely if they don’t.>>>>>>>> Regards,>>>>>>> John Ralls
>>>>>> 
>>>>>> It appears that I don't have i386 MacOS development libraries
>>>>>> installed on my x86_64 system:>> 
>>>>>> ld: warning: ignoring file /Applications/Xcode.app/Contents/Develope-
>>>>>> >>>> r/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/-
>>>>>> usr/lib->>>>>>  /l->>>> ibpq.tbd[2], missing required architecture i386 in file
>>>>>>  /Application->>>> s/Xcode.app/Contents/Developer/Platforms/MacO-
>>>>>>  SX.platform/Developer->>>>>>  /S->>>> DKs/MacOSX10.13.sdk/usr/lib/libpq.tbd[3]>> Undefined
>>>>>>  symbols for>>>>>> architecture i386:>>>> .
>>>>>> .
>>>>>> .
>>>>>> ld: symbol(s) not found for architecture i386
>>>>>> clang: error: linker command failed with exit code 1 (use -v to
>>>>>> see>>>> invocation)>>>>>>>> Is that something that's readily available for download
>>>>>> somewhere?>>> No, but there’s a module for it in gnucash-on-
>>>>>> osx/modules, so just>>>>> build it.> 
>>>>> Or try out 2.7.1 which is 64-bit and already has libdbd-pgsql in
>>>>> the>>> bundle… but try it on a copy as it’s not even beta yet.>>>>>> Regards,
>>>>> John Ralls
>>>>> 
>>>> 
>>>> Hi John,
>>>> 
>>>> Using this .modules file:
>>>> https://github.com/Gnucash/gnucash-on-osx/blob/master/modulesets/gnucash.modules>>
>>>> It was not clear which module would satisfy the missing i386>>>> libraries,>> so I tried meta-gtk-osx-core, as that "sounded" right
>>>> (LoL).>>>> That did not work (`jhbuild build meta-gtk-osx-core`), ultimately
>>>> failing with the error: "Neither GTK+-2.0 nor GTK+-3.0 was found"
>>>> Before I go down the path of trying 2.7.1 -- would you clarify more>>>> specifically what's meant by "there's a module for it in gnucash-on-
>>>> >> osx/modules, so just build it"?>>>> Thanks!
>>>> Ed
>>>> 
>>>> Links:
>>>> 
>>>>  1. http://gnucash.app/Contents/Resources/lib/dbd/libdbdpgsql.so
>>>>  2. http://xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libpq.tbd>>
>>>>     3.
>>>>     http://xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libpq.tbd>
>>>>     `jhbuild build pgsql`>>> 
>>> It has one dependency, openssl, that’s a real pain it the neck
>>> (and a>>> few other places). Let it configure and hit control-C when it starts>>> to build, then run `make && make install_sw`. Control-D to quit the>>> shell, tell it 2 continue to install. Control-C again immediately
>>> when it starts to install and select 2 continue to next module.
>>> Postgresql will build on its own. When it’s done you can rebuild
>>> libdbi and libdbd.> 
>>> Regards,
>>> John Ralls
>>> 
>> 
>> Hi John,
>> 
>> So I gave `jhbuild build pgsql` a go, and I may not have been
>> successful>> at choreographing the Control-C's to kill the build at the
>> appropriate>> times...hard to tell.
>> I'm not having any trouble building openssl -- it builds
>> successfully.>> Even if I run `jhbuild build openssl`
>> Then I run `make && make install_sw` and it builds for a while and
>> errors out with the same "Undefined symbols for i386" error:
>> ```
>> ld: warning: ignoring file /Applications/Xcode.app/Contents/Develop-
>> er/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib-
>> /libpq.tbd, missing required architecture i386 in file /Application-
>> s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/-
>> SDKs/MacOSX10.13.sdk/usr/lib/libpq.tbdUndefined symbols for
>> architecture i386:>> ```
>> 
>> FWIW -- here's my gnucash.modules:
>> https://gist.github.com/ebridges/7df9f3b4b634be28bab5f35a8052b4e0
>> 
>> And, here's my .jhbuildrc-custom:
>> https://gist.github.com/ebridges/521017dcf7795ccd22a9dc5e4e8977cf
>> 
>> The steps I followed two times, each time from a clean home
>> directory of>> a "gnucash" user:
>> * `./gtk-osx-build-setup.sh`
>> * `jhbuild bootstrap`
>> * [`jhbuild build openssl`]
>> * `jhbuild build pgsql`
>> * ctrl-c when configuration has finished
>> * Run `make && make install_sw`
>> * Fails due to missing i386 arch. symbolsFirst time through, I ran it
>>   without the openssl step.  Second time, I>> ran it explicitly.
>> Please advise, thanks!
>> Ed
>> 
>> _______________________________________________
>> gnucash-devel mailing list
>> gnucash-devel at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Yes I did -- see the .jhbuildrc-custom that I linked in the gist:
https://gist.github.com/ebridges/521017dcf7795ccd22a9dc5e4e8977cf#file-jhbuildrc-custom-L24
I really appreciate your patience -- maybe I'm pushing up against an
edge case or a bizarre situation in my setup.  While I'd prefer to
use PostgreSQL, I'm beginning to think I'll just live with SQLite;
unless there's something pretty obvious that I'm missing I hate to
waste your time.


More information about the gnucash-devel mailing list