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.
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.
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.
Created attachment 237412 [details] Build log of WebKit revision 173137 on FreeBSD
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.
(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.
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"'
(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"'
(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)"
(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?
(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
(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 ...
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?
Created attachment 239704 [details] Adding required flags to g-ir-scanner command line without using LDFLAGS
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.
(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?
(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
Created attachment 239859 [details] Adding required flags to g-ir-scanner command line without using LDFLAGS
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
Can anyone review the patches again?
Created attachment 241486 [details] [GTK] Add library search paths from LDFLAGS before pkg-config --libs
(In reply to comment #20) > Created attachment 241486 [details] > [GTK] Add library search paths from LDFLAGS before pkg-config --libs Looks good to me.
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!
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>
All reviewed patches have been landed. Closing bug.