FreeBSD?

519 views
Skip to first unread message

Olivier

unread,
Nov 3, 2010, 8:27:12 PM11/3/10
to mod-pagespeed-discuss
I was surprised to see that the source code was not made available and
thus we couldn't compile mod_pagespeed on FreeBSD.
Will that change in the near future?

Richard Rabbat

unread,
Nov 3, 2010, 8:31:09 PM11/3/10
to mod-pagesp...@googlegroups.com
all the source is available at:


feel free to try out FreeBSD

Libo Song

unread,
Nov 3, 2010, 11:15:55 PM11/3/10
to mod-pagesp...@googlegroups.com
The mod_pagespeed team has not tested on FreeBSD. Contributions are welcome.

Olivier

unread,
Nov 4, 2010, 6:32:31 AM11/4/10
to mod-pagespeed-discuss
Cheers

Olivier

unread,
Nov 4, 2010, 7:40:12 AM11/4/10
to mod-pagespeed-discuss
Just gave it a go and it's not possible to even download the source on
FreeBSD.
After having fixed gclient (wrong bash path) and launched the sync
process (gclient sync --force), I get this:

Updating projects from gyp files...
../build/linux/python_arch.sh: not found

Seems there are Linux specific requirements.


On Nov 4, 12:31 am, Richard Rabbat <rab...@google.com> wrote:

Shawn Ligocki

unread,
Nov 4, 2010, 7:45:46 AM11/4/10
to mod-pagesp...@googlegroups.com
We'll look into this, sorry about that. gclient is a chromium tool, they may have more experience with this, if you wanted to poke around.

-Shawn

toomas.aas

unread,
Nov 8, 2010, 4:36:06 PM11/8/10
to mod-pagespeed-discuss

On Nov 4, 1:40 pm, Olivier <interfa...@gmail.com> wrote:
>
> Updating projects from gyp files...
> ../build/linux/python_arch.sh: not found

FWIW, to get past this you just need to change the first line of build/
linux/python_arch.sh the same way you already changed gclient, i.e. /
usr/local/bin/bash instead of /bin/bash. In the same file, you also
need to change the line that says

python=$(readlink -f "$1")
to
python=$(stat -f "$1")

When you get to actually building and it bails out because not finding
execinfo.h, install the devel/libexecinfo port, and set the
environment variables
CFLAGS=-I/usr/local/include
CXXFLAGS=-I/usr/local/include

That's how far I've gotten so far. I still haven't managed to complete
the build successfully though, because at one point it bails out with:

CXX(target) out/Release/obj.target/pagespeed_output_pb/gen/
protoc_out/pagespeed/proto/pagespeed_output.pb.
o
In file included from out/Release/obj/gen/protoc_out/pagespeed/proto/
pagespeed_output.pb.cc:4:
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1470: error: expected unqualified-id be
fore 'int'

(several other similar errors follow this).

ATTA

unread,
Nov 9, 2010, 12:37:20 PM11/9/10
to mod-pagespeed-discuss
I have also same issue on suse8.1
gcc/c++ 4.5.1
kernel 2.6.31.12

if any update on this will be appreciated.

g++ -Werror -pthread -fno-exceptions -Wall -Wno-unused-parameter -Wno-
missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -
m32 -mmmx -march=i686 -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 '-DGOOGLE_PROTOBUF_NO_RTTI'
'-D__STDC_FORMAT_MACROS' '-DNDEBUG' -Ithird_party/chromium/src -Iout/
Release/obj/gen/protoc_out -Ithird_party/protobuf2 -Ithird_party/
protobuf2/src/src -MMD -MF out/Release/.deps/out/Release/obj.target/
pagespeespeed_output.pb.o out/Release/obj/gen/protoc_out/pagespeed/
proto/pagespeed_output.pb.cc
In file included from out/Release/obj/gen/protoc_out/pagespeed/proto/
pagespeed_output.pb.cc:4:0:
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1470:36: error: expected unqualified-id before 'int'
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1470:36: error: expected ')' before 'int'
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1470:36: error: expected ')' before 'int'
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1477:36: error: expected unqualified-id before 'int'
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1477:36: error: expected ')' before 'int'
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
1477:36: error: expected ')' before 'int'
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
2930:43: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.h:
2946:43: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
In member function 'virtual void
pagespeed::Version::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*)
const':
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3492:71: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3492:71: error: expected primary-expression before ')' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3497:71: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3497:71: error: expected primary-expression before ')' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
In member function 'virtual int pagespeed::Version::ByteSize() const':
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3515:17: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3515:17: error: expected primary-expression before ')' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3522:17: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3522:17: error: expected primary-expression before ')' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
In member function 'void pagespeed::Version::MergeFrom(const
pagespeed::Version&)':
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3546:22: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3546:22: error: expected primary-expression before ')' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3549:22: error: expected unqualified-id before '(' token
out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:
3549:22: error: expected primary-expression before ')' token





On Nov 8, 4:36 pm, "toomas.aas" <toomas....@raad.tartu.ee> wrote:
> On Nov 4, 1:40 pm, Olivier <interfa...@gmail.com> wrote:
>
>
>
> > Updating projects from gyp files...
> > ../build/linux/python_arch.sh: not found
>
> FWIW, to get past this you just need to change the first line of build/
> linux/python_arch.sh the same way you already changed gclient, i.e. /
> usr/local/bin/bash instead of /bin/bash. In the same file, you also
> need to change the line that says
>
> python=$(readlink -f "$1")
> to
> python=$(stat -f "$1")
>
> When you get to actually building and it bails out because not finding
> execinfo.h, install the devel/libexecinfo port, and set the
> environment variables
> CFLAGS=-I/usr/local/include
> CXXFLAGS=-I/usr/local/include
>
> That's how far I've gotten so far. I still haven't managed to complete
> the build successfully though, because at one point it bails out with:
>
>   CXX(target) out/Release/obj.target/pagespeed_output_pb/gen/
> protoc_out/pagespeed/proto/pagespeed_output.pb.
> o
> In file included from out/Release/obj/gen/protoc_out/pagespeed/proto/pagespeed_output.pb.cc:4:

busy

unread,
Nov 16, 2010, 8:10:08 PM11/16/10
to mod-pagespeed-discuss
after:
1. using bash
2. changing maunally python=$(readlink -f "$1") to stat in ~/
mod_pagespeed/src/build/linux/python_arch.sh
3. installing libexecinfo port
4. linking execinfo.h from /usr/local/includes to /usr/includes
5. gmake
CC(target) out/Debug/obj.target/base/third_party/chromium/src/base/
third_party/dynamic_annotations/dynamic_annotations.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
third_party/dmg_fp/dtoa.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
third_party/dmg_fp/g_fmt.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
third_party/nspr/prtime.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
atomicops_internals_x86_gcc.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
at_exit.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
debug_util.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
debug_util_posix.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
lock.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
lock_impl_posix.o
CXX(target) out/Debug/obj.target/base/base/logging.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
platform_thread_posix.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
safe_strerror_posix.o
CXX(target) out/Debug/obj.target/base/base/stats_table.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
string_number_conversions.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
string_piece.o
CXX(target) out/Debug/obj.target/base/base/string_util.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
string16.o
CXX(target) out/Debug/obj.target/base/base/stub_utf.o
CXX(target) out/Debug/obj.target/base/third_party/chromium/src/base/
md5.o
AR(target) out/Debug/obj.target/base/libbase.a
TOUCH out/Debug/obj.target/third_party/apache/apr/include.stamp
TOUCH out/Debug/obj.target/third_party/apache/aprutil/include.stamp
TOUCH out/Debug/obj.target/third_party/apache/httpd/include.stamp
CXX(target) out/Debug/obj.target/html_rewriter/net/instaweb/apache/
apache_message_handler.o
In file included from third_party/apache/httpd/src/include/ap_config.h:
25,
from third_party/apache/httpd/src/include/httpd.h:43,
from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/apr/gen/arch/linux/ia32/include/apr.h:285: error:
'off64_t' does not name a type
In file included from third_party/apache/apr/src/include/apr_file_io.h:
29,
from third_party/apache/apr/src/include/
apr_network_io.h:26,
from third_party/apache/httpd/src/include/httpd.h:53,
from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/apr/src/include/apr_file_info.h:198: error:
'apr_off_t' does not name a type
third_party/apache/apr/src/include/apr_file_info.h:200: error:
'apr_off_t' does not name a type
In file included from third_party/apache/apr/src/include/
apr_network_io.h:26,
from third_party/apache/httpd/src/include/httpd.h:53,
from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/apr/src/include/apr_file_io.h:653: error:
'apr_off_t' has not been declared
third_party/apache/apr/src/include/apr_file_io.h:881: error:
'apr_off_t' has not been declared
In file included from third_party/apache/httpd/src/include/httpd.h:53,
from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/apr/src/include/apr_network_io.h:566: error:
'apr_off_t' has not been declared
In file included from third_party/apache/aprutil/src/include/
apr_buckets.h:32,
from third_party/apache/httpd/src/include/httpd.h:54,
from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/apr/src/include/apr_mmap.h:134: error: 'apr_off_t'
has not been declared
third_party/apache/apr/src/include/apr_mmap.h:161: error: 'apr_off_t'
has not been declared
In file included from third_party/apache/httpd/src/include/httpd.h:54,
from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/aprutil/src/include/apr_buckets.h:242: error:
'apr_off_t' does not name a type
third_party/apache/aprutil/src/include/apr_buckets.h:725: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:738: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:774: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:910: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:911: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:1202: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:1401: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:1415: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:1471: error:
'apr_off_t' has not been declared
third_party/apache/aprutil/src/include/apr_buckets.h:1487: error:
'apr_off_t' has not been declared
In file included from net/instaweb/apache/apache_message_handler.cc:
19:
third_party/apache/httpd/src/include/httpd.h:858: error: 'apr_off_t'
does not name a type
third_party/apache/httpd/src/include/httpd.h:860: error: 'apr_off_t'
does not name a type
third_party/apache/httpd/src/include/httpd.h:871: error: 'apr_off_t'
does not name a type
third_party/apache/httpd/src/include/httpd.h:874: error: 'apr_off_t'
does not name a type
third_party/apache/httpd/src/include/httpd.h:876: error: 'apr_off_t'
does not name a type
gmake: *** [out/Debug/obj.target/html_rewriter/net/instaweb/apache/
apache_message_handler.o] Error 1

Michel

unread,
Dec 14, 2010, 11:18:37 AM12/14/10
to mod-pagespeed-discuss
I'm not able to build mod_pagespeed on FreeBSD too.

After reading other users experience, and following the HowToBuild
(wiki), this what I've done additionaly :
- having gmake installed and using instead of make
- installing subversion port
- installing bash port
- linking bash in /bin/bash (ln -s /usr/local/bin/bash /bin/bash)
- adding "/root/bin/depot_tools/" to the environment variable PATH
- installing libexecinfo port
- set the environment variables CFLAGS and CXXFLAGS both to : -I/usr/
local/include
- modifying src/build/linux/python_arch.sh, on line 13 : python=$
(readlink -f "$1")
replacing with : python=$(stat -f "$1")

But at "gmake BUILDTYPE=Release", this only return one error line :

out/Release/.deps/out/Release/obj.target/base/third_party/chromium/src/
base/atomicops_internals_x86_gcc.o.d:10: *** target pattern contains
no `%'. Stop.

and nothing else...
I'm stalled. Any idea ?

It seems to be really only buildable on Linux, as the doc says...

Joshua Marantz

unread,
Dec 14, 2010, 11:38:42 AM12/14/10
to mod-pagesp...@googlegroups.com
Someone on this list has actually built it on Windows, but we have no further details (cygwin?  Visual Studio?)  However it does indicate there isn't too much Linux-specific in it.  It's just a matter of getting the build tools aligned.

I have one question from your description:

On Tue, Dec 14, 2010 at 11:18 AM, Michel <mpo...@gmail.com> wrote:
- having gmake installed and using instead of make

What exactly do you mean by this?  Do you mean that when you type "which make" it shows you an executable that is really gmake?  If not, I wonder if that would help with this error:

 
But at "gmake BUILDTYPE=Release", this only return one error line :

out/Release/.deps/out/Release/obj.target/base/third_party/chromium/src/
base/atomicops_internals_x86_gcc.o.d:10: *** target pattern contains
no `%'.  Stop.

The suspicion I have is that 'make' is called recursively, and the build infrastructure we are using (borrowed from Chromium) assumes that make is really gmake, and that when make is called recursively you are really getting the BSD make or something else that isn't gmake.

-Josh

Michel

unread,
Dec 14, 2010, 1:30:55 PM12/14/10
to mod-pagespeed-discuss
On 14 déc, 17:38, Joshua Marantz <jmara...@google.com> wrote:
> The suspicion I have is that 'make' is called recursively, and the build
> infrastructure we are using (borrowed from Chromium) assumes that make is
> really gmake, and that when make is called recursively you are really
> getting the BSD make or something else that isn't gmake.

In fact, I have just found that I need to remove manually the Release/
dir in src/out/ before relaunching (g)make.
Not removing it make the previous error happen.
(make/gmake : it seems to work fine. And "which" gives me : which
gmake -> /usr/local/bin/gmake ; which make -> /usr/bin/make)

But...
When removing Release/ before lauching make, a new error is
displayed :
-------------------
$ gmake BUILDTYPE=Release
(...)
CXX(target) out/Release/obj.target/googleurl/googleurl/src/
url_canon_host.o
CXX(target) out/Release/obj.target/googleurl/googleurl_noicu/
url_canon_noicu.o
In file included from third_party/icu/public/common/unicode/utypes.h:
36,
from third_party/icu/public/common/unicode/utf.h:111,
from googleurl_noicu/url_canon_noicu.cc:35:
third_party/icu/public/common/unicode/umachine.h:53:72: error: unicode/
ptypes.h: No such file or directory
In file included from third_party/icu/public/common/unicode/utypes.h:
36,
from third_party/icu/public/common/unicode/utf.h:111,
from googleurl_noicu/url_canon_noicu.cc:35:
third_party/icu/public/common/unicode/umachine.h:220: error: 'int8_t'
does not name a type
(...+ more errors on types like 'int8_t', 'uint16_t', 'int32_t',
'UBool', etc...)
(...)
googleurl_noicu/url_canon_noicu.cc:86: error: 'UChar32' was not
declared in this scope
gmake: *** [out/Release/obj.target/googleurl/googleurl_noicu/
url_canon_noicu.o] Error 1
-------------------

So, looking in :
third_party/icu/public/common/unicode/umachine.h
I see :
#if defined(U_PALMOS)
# include "unicode/ppalmos.h"
#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) ||
defined(_WIN64)
# include "unicode/pwin32.h"
#elif defined(__APPLE__)
# include "unicode/pmac.h"
#elif defined(__linux__)
# include "unicode/plinux.h"
#else
# include "unicode/ptypes.h" /* platform.h is included in ptypes.h
*/
#endif
On my FreeBSD box, it seems to go to the "else" condition (L.53),
includes the "unicode/ptypes.h" file,
and I dont have any "ptypes.h" in my source
(despite I have "plinux.h", "pmac.h" and "pwin32.h" files) :
src/third_party/icu/public/common/unicode/plinux.h
src/third_party/libpagespeed/src/third_party/icu/public/common/
unicode/plinux.h
... no "ptypes.h" files in thoses dirs.
(no "ppalmos.h" too... D'oh! PalmOS ???? ;-) )

Should I add some additional software, or is there something missing
in the source ?
I presume/hope it's missing in src, because mod_pagespeed is not made
for something other than in the line : "elif defined(__linux__)" ;-)

My Box : FreeBSD 7.2-RELEASE / amd64

Joshua Marantz

unread,
Dec 14, 2010, 2:05:13 PM12/14/10
to mod-pagesp...@googlegroups.com
My suggestion is to change your PATH so that 'which make' gives you a binary that is really gmake.

I'm a little confused about what should happen if you remove the Release dir.  Perhaps that's removing some generated headers too?  Do you need to do that if you are pointing at the correct make?

-Josh

Michel

unread,
Dec 14, 2010, 2:03:34 PM12/14/10
to mod-pagespeed-discuss
On 14 déc, 17:38, Joshua Marantz <jmara...@google.com> wrote:
> The suspicion I have is that 'make' is called recursively, and the build
> infrastructure we are using (borrowed from Chromium) assumes that make is
> really gmake, and that when make is called recursively you are really
> getting the BSD make or something else that isn't gmake.

Yes I think it *could* lead in future problems,
but for now I don't think it's the origin of the errors I see when
building.

Maksim Orlovich

unread,
Dec 14, 2010, 2:55:08 PM12/14/10
to mod-pagesp...@googlegroups.com
I don't think gyp generated Makefiles use recursive make. The first error message suggests 
more that something went wrong when generating a dependency file --- those shouldn't have
patterns anyway. Perhaps looking at it might be informative in some way. A guess: any chance you 
first tried with BSD make, and then with GNU make w/o blowing away the build directory?

As for libICU, it seems like we're pulling in a version from page-speed that's missing 
some of the headers (it's documented as a subset, in fact)... And actually, do we 
even need it --- it looks like newer page-speed has dropped the ICU dependency 
anyway? On that note, maybe this will help:

--- DEPS        (revision 309)
+++ DEPS        (working copy)
@@ -115,9 +115,9 @@
     Var("google_sparsehash_root") + Var("google_sparsehash_revision"),
   "src/third_party/libjpeg": From(Var("libpagespeed_deps_root")),
 
-  "src/third_party/icu":
-    (Var("libpagespeed_trunk") + "/src/third_party/icu" +
-     Var("libpagespeed_revision")),
+#  "src/third_party/icu":
+#    (Var("libpagespeed_trunk") + "/src/third_party/icu" +
+ #    Var("libpagespeed_revision")),
 
   "src/third_party/libpagespeed/src/build":
     (Var("libpagespeed_trunk") + "/src/build" +

Michel

unread,
Dec 16, 2010, 6:45:27 AM12/16/10
to mod-pagespeed-discuss
On 14 déc, 20:05, Joshua Marantz <jmara...@google.com> wrote:
> My suggestion is to change your PATH so that 'which make' gives you a binary
> that is really gmake.

Ok, I have give it a try (I don't want to remove /usr/bin/, where BSD
make is, from PATH) :
$ mv /usr/bin/make /usr/bin/make.old
$ ln -s /usr/local/bin/gmake /usr/bin/make
So when calling /usr/bin/make , gmake is called instead of the bsd
make (tested : make -V reply with "invalid option" + gnu stuff).
But when making, there was no difference : exactly the same error
$ cd mod_pagespeed/src
$ make BUILDTYPE=Release
(...ending with:)
make: *** [out/Release/obj.target/googleurl/googleurl_noicu/
url_canon_noicu.o] Error 1
(only difference is it just displays "make" instead of gmake", of
course)


> I'm a little confused about what should happen if you remove the Release
> dir.  Perhaps that's removing some generated headers too?  Do you need to do
> that if you are pointing at the correct make?

Yes, I tested it with/without removing out/Release/ : exactly the same
error when calling directly gmake or the "make" symbolic link :
Without removing this dir prior to "make", make just reply with one
error line, in both cases :
out/Release/.deps/out/Release/obj.target/base/third_party/chromium/
src/base/atomicops_internals_x86_gcc.o.d:10: *** target pattern
contains no `%'. Stop.

And when looking in this file atomicops_internals_x86_gcc.o.d :
------------------------------------------------------------
[L.1]cmd_out/Release/obj.target/base/third_party/chromium/src/base/
atomicops_internals_x86_gcc.o := 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 -Wno-write-
strings -Wno-error -Wno-write-strings -O2 -fno-ident -fdata-sections -
ffunction-sections -fno-asynchronous-unwind-tables -fno-rtti -fno-
threadsafe-statics -fvisibility-inlines-hidden -frtti '-
D__STDC_FORMAT_MACROS' '-DNDEBUG' -Ithird_party/chromium/src -MMD -MF
out/Release/.deps/out/Release/obj.target/base/third_party/chromium/src/
base/atomicops_internals_x86_gcc.o.d.raw -c -o out/Release/obj.target/
base/third_party/chromium/src/base/atomicops_internals_x86_gcc.o
third_party/chromium/src/base/atomicops_internals_x86_gcc.cc
[L.2] \
[L.3] out/Release/obj.target/base/third_party/chromium/src/base/
atomicops_internals_x86_gcc.o: \
[L.4] third_party/chromium/src/base/atomicops_internals_x86_gcc.cc \
[L.5] third_party/chromium/src/base/atomicops.h \
[L.6] third_party/chromium/src/base/basictypes.h \
[L.7] third_party/chromium/src/base/port.h \
[L.8] third_party/chromium/src/build/build_config.h \
[L.9] third_party/chromium/src/base/atomicops_internals_x86_gcc.h
[L.10]nout/Release/obj.target/base/third_party/chromium/src/base/
atomicops_internals_x86_gcc.o:nn:
[L.11]nthird_party/chromium/src/base/atomicops_internals_x86_gcc.ccn:
[L.12]nnthird_party/chromium/src/base/atomicops.hn:
[L.13]nnthird_party/chromium/src/base/basictypes.hn:
[L.14]nnthird_party/chromium/src/base/port.hn:
[L.15]nnthird_party/chromium/src/build/build_config.hn:
[L.16]nnthird_party/chromium/src/base/atomicops_internals_x86_gcc.h:
------------------------------------------------------------

So line 10 contains :
nout/Release/obj.target/base/third_party/chromium/src/base/
atomicops_internals_x86_gcc.o:nn:
and this is far away from my skills, I don't understand what is this.
Is it normal ?

Joshua Marantz

unread,
Dec 16, 2010, 9:15:28 AM12/16/10
to mod-pagesp...@googlegroups.com
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.

-Josh

Michel

unread,
Dec 16, 2010, 9:44:23 AM12/16/10
to mod-pagespeed-discuss
On 14 déc, 20:55, Maksim Orlovich <morlov...@google.com> wrote:
> I don't think gyp generated Makefiles use recursive make. The first error
> message suggests more that something went wrong when generating a
> dependency file --- those shouldn't have patterns anyway. Perhaps
> looking at it might be informative in some way.

Ok, I looked in it but I don't have skills to understand its content.
I pasted this file "atomicops_internals_x86_gcc.o.d" in my previous
message (16 dec, 12:45).
The fact is when removing whole out/Release dir before each make, this
error doesn't display : so perhaps it's not very important ?

> A guess: any chance you
> first tried with BSD make, and then with GNU make w/o blowing away the build
> directory?

I tried this too : removing everything in /mod_pagespeed et starting
over from the begining "gclient config http://modpagespeed.googlecode.com/svn/trunk/src".
When doing "gmake BUILDTYPE=Release" for the first time, it's working
a while and finally ends with this error :
gmake: *** [out/Release/obj.target/googleurl/googleurl_noicu/
url_canon_noicu.o] Error 1
When doing it a second time ("gmake BUILDTYPE=Release"),
it still gives me the previous error :
out/Release/.deps/out/Release/obj.target/base/third_party/chromium/
src/base/atomicops_internals_x86_gcc.o.d:10: *** target pattern
contains no `%'. Stop.
There is no differences, it seems not to be due to a erroneous use of
bsd make instead of gmake.

> As for libICU, it seems like we're pulling in a version from page-speed
> that's missing
> some of the headers (it's documented as a subset, in fact)... And actually,
> do we
> even need it --- it looks like newer page-speed has dropped the ICU
> dependency
> anyway? On that note, maybe this will help:
>
> --- DEPS        (revision 309)
> +++ DEPS        (working copy)
> @@ -115,9 +115,9 @@
>      Var("google_sparsehash_root") + Var("google_sparsehash_revision"),
>    "src/third_party/libjpeg": From(Var("libpagespeed_deps_root")),
>
> -  "src/third_party/icu":
> -    (Var("libpagespeed_trunk") + "/src/third_party/icu" +
> -     Var("libpagespeed_revision")),
> +#  "src/third_party/icu":
> +#    (Var("libpagespeed_trunk") + "/src/third_party/icu" +
> + #    Var("libpagespeed_revision")),
>
>    "src/third_party/libpagespeed/src/build":
>      (Var("libpagespeed_trunk") + "/src/build" +

Ok, I will have a look at it.

Michel

unread,
Dec 16, 2010, 1:08:17 PM12/16/10
to mod-pagespeed-discuss
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
---------------------------------------------------

Andrey Belashkov

unread,
Feb 1, 2011, 4:23:14 PM2/1/11
to mod-pagespeed-discuss
Any luck with FreeBSD ?

On Dec 16 2010, 8:08 pm, Michel <mpou...@gmail.com> wrote:
> 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 toFreeBSD.  I think there's nothing fundamental about our
> > system that should prevent it from compiling and running onFreeBSD, but it
> > would take some effort to get it to build there.
>
> I understand porting mod_pagespeed toFreeBSDis not a priority for
>   (just add "-c" option :FreeBSD'sflock usage is different from

Michel

unread,
Feb 3, 2011, 4:18:36 AM2/3/11
to mod-pagespeed-discuss
No luck at all for me :-(
Since my previous december-16 message (tests as described), I ain't no
better build progress...

Joshua Marantz

unread,
Aug 10, 2011, 12:06:54 AM8/10/11
to mod-pagesp...@googlegroups.com
Hi all you FreeBSD-ers. 

Someone announced a FreeBSD port of mod_pagespeed on Twitter recently:

bb_qq bb-qq 
mod_pagespeed を FreeBSD 上で動かす方法をまとめました /mod_pagespeed works on #FreeBSD #pagespeed bit.ly/rmDak6

Follow the bit.ly link to http://selfnotepage.blogspot.com/2011/08/modpagespeed-freebsd.html and translate to English with http://translate.google.com.  It looks interesting but I haven't tried it.

If you get a chance to try it and it works, please follow up to this thread.

Good luck!
-Josh
Reply all
Reply to author
Forward
0 new messages