RESOLVED FIXED Bug 136018
[GTK] Add library search paths from LDFLAGS before pkg-config --libs
https://bugs.webkit.org/show_bug.cgi?id=136018
Summary [GTK] Add library search paths from LDFLAGS before pkg-config --libs
Ting-Wei Lan
Reported 2014-08-16 03:40:51 PDT
Created attachment 236711 [details] Build log of WebKit revision 172688 on FreeBSD +++ This bug was initially created as a clone of Bug #134483 +++ I tried to build WebKitGTK+ trunk on FreeBSD 10.0-RELEASE with Clang 3.3 in the base system, but there are many errors.
Attachments
Build log of WebKit revision 172688 on FreeBSD (795.47 KB, application/octet-stream)
2014-08-16 03:40 PDT, Ting-Wei Lan
no flags
Build log of WebKit revision 172702 on FreeBSD (817.36 KB, text/x-log)
2014-08-18 08:59 PDT, Ting-Wei Lan
no flags
Build log of WebKit revision 173137 on FreeBSD (815.71 KB, text/x-log)
2014-08-30 11:09 PDT, Ting-Wei Lan
no flags
Adding required flags to g-ir-scanner command line without using LDFLAGS (4.10 KB, patch)
2014-10-12 07:36 PDT, Ting-Wei Lan
no flags
Adding required flags to g-ir-scanner command line without using LDFLAGS (2.96 KB, patch)
2014-10-15 01:48 PDT, Ting-Wei Lan
no flags
Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built version of libraries when running the temporary executable (2.51 KB, patch)
2014-10-15 01:49 PDT, Ting-Wei Lan
no flags
[GTK] Add library search paths from LDFLAGS before pkg-config --libs (1.74 KB, patch)
2014-11-13 08:32 PST, Ting-Wei Lan
no flags
Zan Dobersek
Comment 1 2014-08-18 01:27:01 PDT
This specific error was fixed a few days ago, in r172690. http://trac.webkit.org/changeset/172690 Can you try compiling again with a newer version of trunk? If all goes fine for you this should be marked as a duplicate of bug #136017.
Ting-Wei Lan
Comment 2 2014-08-18 08:59:42 PDT
Created attachment 236764 [details] Build log of WebKit revision 172702 on FreeBSD LDFLAGS is unset when running g-ir-scanner, so ld cannot find libintl in /usr/local/lib.
Ting-Wei Lan
Comment 3 2014-08-30 11:09:59 PDT
Created attachment 237412 [details] Build log of WebKit revision 173137 on FreeBSD
Carlos Alberto Lopez Perez
Comment 4 2014-08-30 12:54:32 PDT
The error is: /usr/bin/ld: cannot find -lintl If you google for: FreeBSD "cannot find -lintl" you get some results that may help you to track down the issue.
Ting-Wei Lan
Comment 5 2014-08-30 22:16:48 PDT
(In reply to comment #4) > The error is: > > /usr/bin/ld: cannot find -lintl > > If you google for: FreeBSD "cannot find -lintl" > > you get some results that may help you to track down the issue. I set LDFLAGS="-L/usr/local/lib" in the environment in order to find libintl, but it is unset in Source/WebKit2/PlatformGTK.cmake when running g-ir-scanner.
Carlos Alberto Lopez Perez
Comment 6 2014-08-31 09:40:52 PDT
You have to set LDFLAGS, CXXFLAGS or CCFLAGS inside the "--makeargs=" option of the script Tools/Scripts/build-webkit. Check: Tools/Scripts/build-webkit --help Try this: Tools/Scripts/build-webkit --gtk --release --makeargs='LDFLAGS="-L/usr/local/lib"' If this does not work, then try setting also --cmakeargs='LDFLAGS="-L/usr/local/lib"'
Ting-Wei Lan
Comment 7 2014-08-31 20:58:14 PDT
(In reply to comment #6) > You have to set LDFLAGS, CXXFLAGS or CCFLAGS inside the "--makeargs=" option of the script Tools/Scripts/build-webkit. Check: Tools/Scripts/build-webkit --help > > Try this: > > Tools/Scripts/build-webkit --gtk --release --makeargs='LDFLAGS="-L/usr/local/lib"' I don't use build-webkit script. I use cmake directly inside the GNOME JHBuild environment. The command I used to build it is cmake -DCMAKE_BUILD_TYPE=Release -DPORT=GTK JHBuild already sets many needed environment variables, including LDFLAGS="-L/home/lantw44/gnome/devinstall/lib -L/usr/local/lib". However, this does not work because LDFLAGS is ignored because of this bug: https://bugs.webkit.org/show_bug.cgi?id=132220 > > If this does not work, then try setting also --cmakeargs='LDFLAGS="-L/usr/local/lib"'
Carlos Alberto Lopez Perez
Comment 8 2014-09-01 04:19:02 PDT
(In reply to comment #7) > (In reply to comment #6) > > You have to set LDFLAGS, CXXFLAGS or CCFLAGS inside the "--makeargs=" option of the script Tools/Scripts/build-webkit. Check: Tools/Scripts/build-webkit --help > > > > Try this: > > > > Tools/Scripts/build-webkit --gtk --release --makeargs='LDFLAGS="-L/usr/local/lib"' > > I don't use build-webkit script. I use cmake directly inside the GNOME JHBuild environment. The command I used to build it is > > cmake -DCMAKE_BUILD_TYPE=Release -DPORT=GTK > > JHBuild already sets many needed environment variables, including LDFLAGS="-L/home/lantw44/gnome/devinstall/lib -L/usr/local/lib". However, this does not work because LDFLAGS is ignored because of this bug: > https://bugs.webkit.org/show_bug.cgi?id=132220 > Try with any (or both) of this: cmake [...] -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS)"
Ting-Wei Lan
Comment 9 2014-09-01 10:22:13 PDT
(In reply to comment #8) > Try with any (or both) of this: > cmake [...] -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS)" I still get the same error ... Can flags used by g-ir-scanner be passed using this?
Carlos Alberto Lopez Perez
Comment 10 2014-09-01 10:29:18 PDT
(In reply to comment #9) > (In reply to comment #8) > > Try with any (or both) of this: > > cmake [...] -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS)" > > I still get the same error ... > Can flags used by g-ir-scanner be passed using this? try with: export gir_LDFLAGS="$(LDFLAGS)" https://mail.gnome.org/archives/commits-list/2010-June/msg01921.html
Ting-Wei Lan
Comment 11 2014-09-02 05:49:18 PDT
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #8) > > > Try with any (or both) of this: > > > cmake [...] -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS)" > > > > I still get the same error ... > > Can flags used by g-ir-scanner be passed using this? > > try with: > > export gir_LDFLAGS="$(LDFLAGS)" > > https://mail.gnome.org/archives/commits-list/2010-June/msg01921.html This still does not work ...
Ting-Wei Lan
Comment 12 2014-10-11 10:37:36 PDT
gir_LDFLAGS is not used in g-ir-scanner, and CMAKE_MODULE_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS are not used when running g-ir-scanner. Is there any other way to fix the problem?
Ting-Wei Lan
Comment 13 2014-10-12 07:36:13 PDT
Created attachment 239704 [details] Adding required flags to g-ir-scanner command line without using LDFLAGS
Carlos Garcia Campos
Comment 14 2014-10-14 02:04:27 PDT
Comment on attachment 239704 [details] Adding required flags to g-ir-scanner command line without using LDFLAGS View in context: https://bugs.webkit.org/attachment.cgi?id=239704&action=review > Source/WebKit2/ChangeLog:19 > + This patch also modify LD_LIBRARY_PATH to make sure the dynamic linker > + find the correct version of libraries when running the temporary > + executable to generate the .gir file. I don't understand why you need this, and it looks to me like a different issue in any case.
Ting-Wei Lan
Comment 15 2014-10-14 07:17:57 PDT
(In reply to comment #14) > (From update of attachment 239704 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=239704&action=review > > > Source/WebKit2/ChangeLog:19 > > + This patch also modify LD_LIBRARY_PATH to make sure the dynamic linker > > + find the correct version of libraries when running the temporary > > + executable to generate the .gir file. > > I don't understand why you need this, and it looks to me like a different issue in any case. If I don't modify LD_LIBRARY_PATH, the executable generated by g-ir-scanner cannot find some symbols added in the new version because it links to the installed version of libraries. Should I move things related to LD_LIBRARY_PATH to a different patch?
Carlos Garcia Campos
Comment 16 2014-10-15 01:19:21 PDT
(In reply to comment #15) > (In reply to comment #14) > > (From update of attachment 239704 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=239704&action=review > > > > > Source/WebKit2/ChangeLog:19 > > > + This patch also modify LD_LIBRARY_PATH to make sure the dynamic linker > > > + find the correct version of libraries when running the temporary > > > + executable to generate the .gir file. > > > > I don't understand why you need this, and it looks to me like a different issue in any case. > > If I don't modify LD_LIBRARY_PATH, the executable generated by g-ir-scanner cannot find some symbols added in the new version because it links to the installed version of libraries. Should I move things related to LD_LIBRARY_PATH to a different patch? Yes, please
Ting-Wei Lan
Comment 17 2014-10-15 01:48:04 PDT
Created attachment 239859 [details] Adding required flags to g-ir-scanner command line without using LDFLAGS
Ting-Wei Lan
Comment 18 2014-10-15 01:49:17 PDT
Created attachment 239860 [details] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built version of libraries when running the temporary executable
Ting-Wei Lan
Comment 19 2014-10-20 20:44:10 PDT
Can anyone review the patches again?
Ting-Wei Lan
Comment 20 2014-11-13 08:32:07 PST
Created attachment 241486 [details] [GTK] Add library search paths from LDFLAGS before pkg-config --libs
Alberto Garcia
Comment 21 2014-11-17 01:55:07 PST
(In reply to comment #20) > Created attachment 241486 [details] > [GTK] Add library search paths from LDFLAGS before pkg-config --libs Looks good to me.
Carlos Garcia Campos
Comment 22 2014-11-17 02:10:13 PST
Comment on attachment 241486 [details] [GTK] Add library search paths from LDFLAGS before pkg-config --libs Ok, please move the other two patches to new bugs. Thanks!
WebKit Commit Bot
Comment 23 2014-11-17 02:48:38 PST
Comment on attachment 241486 [details] [GTK] Add library search paths from LDFLAGS before pkg-config --libs Clearing flags on attachment: 241486 Committed r176198: <http://trac.webkit.org/changeset/176198>
WebKit Commit Bot
Comment 24 2014-11-17 02:48:43 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.