On 16 déc, 15:15, Joshua Marantz <
jmara...@google.com> wrote:
> Thanks for all your effort, Michel. This does look like you've waded in a
> bit deep. We are reliant on the build tools infrastructure from the
> Chromium project (Chrome browser) and to my knowledge that browser has not
> been ported to FreeBSD. I think there's nothing fundamental about our
> system that should prevent it from compiling and running on FreeBSD, but it
> would take some effort to get it to build there.
I understand porting mod_pagespeed to FreeBSD is not a priority for
your team.
However I have tried a few more things and I'm confused with some new
error messages,
so... perhaps someone will have any clue: thx for your help.
First I will resume what I've done at this point, perhaps it could
help someone :
After reading other users experience, and followed the HowToBuild
(wiki), this what I've done additionaly :
Ports/packages :
- gmake must be installed and *used* instead of make (= BSD make)
- subversion must be installed (ex: portinstall subversion)
- bash must be installed, and link bash in /bin/bash if it is not here
(for me: ln -s /usr/local/bin/bash /bin/bash)
- libexecinfo must be installed
- flock command-line tool must be installed (sysutils/flock, not the
www/flock "social browser")
ENVs :
- add "/root/bin/depot_tools/" to the environment variable PATH
- set the environment variables CFLAGS and CXXFLAGS both to : -I/usr/
local/include
Downloading src :
- (wiki) at the point when we launch : gclient sync --force
- it will stop with several lines, including : "readlink: illegal
option -- f"
- manually modify src/build/linux/python_arch.sh, on line 13 :
python=$(readlink -f "$1")
must be replaced with :
python=$(stat -f "$1")
(replace readlink with stat)
- launch again : gclient sync --force
(it should work)
Modifying src :
- as suggested by Maksim Orlovich, modify src/DEPS, and comment-ou
those 3 lines (L.118+) :
"src/third_party/icu":
(Var("libpagespeed_trunk") + "/src/third_party/icu" +
Var("libpagespeed_revision")),
(not sure why but seems to work - this step maybe avoided, not
tested)
- Download ICU src (cf. mod_pagespeed/src/third_party/icu/
README.pagespeed for versions and urls)
http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.tgz
un-tgz, cd icu/source/ , and just make : ./configure (this will
create some files)
Copy icu/source/common/unicode/ptypes.h
and icu/source/common/unicode/platform.h
in : mod_pagespeed/src/third_party/icu/public/common/unicode/
- Modify src/Makefile line 49 :
LINK ?= flock $(builddir)/linker.lock $(CXX)
must be replaced with :
LINK ?= flock -c $(builddir)/linker.lock $(CXX)
(just add "-c" option : FreeBSD's flock usage is different from
linux's)
Building :
- as written in the wiki : gmake BUILDTYPE=Release
At this point, it ends with several warnings and errors on the "LINK"
step.
It seems to get serious on this error line (previous lines seems to be
only warnings) :
"cc1plus: warnings being treated as errors"
on a "out/Release/obj.target/html_rewriter/net/instaweb/apache/
apr_statistics.o"
Maybe specific Apache srcs files for linux, not for other os ?
Any idea ? I'm stuck.
log :
---------------------------------------------------
(...)
LINK(target) out/Release/html_minifier_main
/usr/bin/ld: Warning: gc-sections option ignored
out/Release/obj.target/base/libbase.a(debug_util_posix.o)
(.text._ZN10StackTraceC2Ev+0x16): In function
`StackTrace::StackTrace()':
: undefined reference to `backtrace'
out/Release/obj.target/base/libbase.a(debug_util_posix.o)
(.text._ZN10StackTraceC1Ev+0x16): In function
`StackTrace::StackTrace()':
: undefined reference to `backtrace'
out/Release/obj.target/base/libbase.a(debug_util_posix.o)
(.text._ZN78_GLOBAL__N_third_party_chromium_src_base_debug_util_posix.cc_00000000_726EC58119GetBacktraceStringsEPPviPSt6vectorISsSaISsEE
+0x1c): In function `(anonymous
namespace)::GetBacktraceStrings(void**, int, std::vector<std::string,
std::allocator<std::string> >*)':
: undefined reference to `backtrace_symbols'
ACTION Extracting last change to /usr/home/michel/install/
mod_pagespeed/src/out/Release/obj/gen/build/LASTCHANGE out/Release/obj/
gen/build/LASTCHANGE.always
TOUCH out/Release/obj.target/build/lastchange.stamp
ACTION Generating version header file: "/usr/home/michel/install/
mod_pagespeed/src/out/Release/obj/gen/net/instaweb/public/version.h"
out/Release/obj/gen/net/instaweb/public/version.h
TOUCH out/Release/obj.target/build/
mod_pagespeed_version_header.stamp
TOUCH out/Release/obj.target/third_party/apache/apr/include.stamp
TOUCH out/Release/obj.target/third_party/apache/aprutil/
include.stamp
TOUCH out/Release/obj.target/third_party/apache/httpd/include.stamp
CXX(target) out/Release/obj.target/html_rewriter/net/instaweb/apache/
apache_message_handler.o
CXX(target) out/Release/obj.target/html_rewriter/net/instaweb/apache/
apache_rewrite_driver_factory.o
CXX(target) out/Release/obj.target/html_rewriter/net/instaweb/apache/
apache_slurp.o
CXX(target) out/Release/obj.target/html_rewriter/net/instaweb/apache/
apr_file_system.o
CXX(target) out/Release/obj.target/html_rewriter/net/instaweb/apache/
apr_mutex.o
CXX(target) out/Release/obj.target/html_rewriter/net/instaweb/apache/
apr_statistics.o
cc1plus: warnings being treated as errors
net/instaweb/apache/apr_statistics.cc: In member function 'bool
net_instaweb::AprVariable::InitMutex(const net_instaweb::StringPiece&,
apr_pool_t*, bool)':
net/instaweb/apache/apr_statistics.cc:153: warning: missing sentinel
in function call
net/instaweb/apache/apr_statistics.cc: In member function 'bool
net_instaweb::AprVariable::InitShm(const net_instaweb::StringPiece&,
apr_pool_t*, bool)':
net/instaweb/apache/apr_statistics.cc:197: warning: missing sentinel
in function call
gmake: *** [out/Release/obj.target/html_rewriter/net/instaweb/apache/
apr_statistics.o] Error 1
---------------------------------------------------
With verbose mode (gmake V=1 BUILDTYPE=Release),
the lasts lines are :
---------------------------------------------------
g++ -I/usr/local/include -Werror -pthread -fno-exceptions -Wall -Wno-
unused-parameter -Wno-missing-field-initializers -
D_FILE_OFFSET_BITS=64 -fvisibility=hidden -fPIC -fno-strict-aliasing -
fexceptions -fasynchronous-unwind-tables -O2 -fno-ident -fdata-
sections -ffunction-sections -fno-asynchronous-unwind-tables -fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden -frtti '-
D_LARGEFILE64_SOURCE' '-DHAVE_CONFIG_H' '-DLINUX=2' '-D_REENTRANT' '-
D_GNU_SOURCE' '-D__STDC_FORMAT_MACROS' '-DNDEBUG' -Ithird_party/
chromium/src -I. -Iout/Release/obj/gen -Ithird_party/apache/httpd/src/
include -Ithird_party/apache/httpd/src/os/unix -Ithird_party/apache/
httpd/gen/arch/linux/x64/include -Ithird_party/apache/apr/src/include -
Ithird_party/apache/apr/src/include/arch/unix -Ithird_party/apache/apr/
gen/arch/linux/x64/include -Ithird_party/apache/aprutil/src/include -
Ithird_party/apache/aprutil/gen/arch/linux/x64/include -Ithird_party/
serf/src -MMD -MF out/Release/.deps/out/Release/obj.target/
html_rewriter/net/instaweb/apache/apr_statistics.o.d.raw -c -o out/
Release/obj.target/html_rewriter/net/instaweb/apache/apr_statistics.o
net/instaweb/apache/apr_statistics.cc
cc1plus: warnings being treated as errors
net/instaweb/apache/apr_statistics.cc: In member function 'bool
net_instaweb::AprVariable::InitMutex(const net_instaweb::StringPiece&,
apr_pool_t*, bool)':
net/instaweb/apache/apr_statistics.cc:153: warning: missing sentinel
in function call
net/instaweb/apache/apr_statistics.cc: In member function 'bool
net_instaweb::AprVariable::InitShm(const net_instaweb::StringPiece&,
apr_pool_t*, bool)':
net/instaweb/apache/apr_statistics.cc:197: warning: missing sentinel
in function call
gmake: *** [out/Release/obj.target/html_rewriter/net/instaweb/apache/
apr_statistics.o] Error 1
---------------------------------------------------