Bug 205401 - www/node: Build fails (5.2.0) on FreeBSD 9.x
Summary: www/node: Build fails (5.2.0) on FreeBSD 9.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords: easy, regression
Depends on:
Blocks:
 
Reported: 2015-12-18 15:17 UTC by Ryan Frederick
Modified: 2015-12-29 00:12 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Frederick 2015-12-18 15:17:43 UTC
The current version of www/node (5.2.0) fails during build:

  g++48 '-DV8_TARGET_ARCH_IA32' '-DENABLE_DISASSEMBLER' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC
' -I../deps/v8  -pthread -Wall -Wextra -Wno-unused-parameter -m32 -msse2 -mfpmath=sse -mmmx -fno-strict-aliasing -I/usr/local/include -
m32 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -
std=gnu++0x -MMD -MF /usr/ports/www/node/work/node-v5.2.0/out/Release/.deps//usr/ports/www/node/work/node-v5.2.0/out/Release/obj.target
/v8_base/deps/v8/src/log-utils.o.d.raw  -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc48 
-c -o /usr/ports/www/node/work/node-v5.2.0/out/Release/obj.target/v8_base/deps/v8/src/log-utils.o ../deps/v8/src/log-utils.cc
In file included from ../deps/v8/src/log-utils.cc:5:0:
../deps/v8/src/log-utils.h:64:39: error: 'va_list' has not been declared
     void AppendVA(const char* format, va_list args);
                                       ^
../deps/v8/src/log-utils.h: In member function 'int v8::internal::Log::WriteToFile(const char*, int)':
../deps/v8/src/log-utils.h:109:54: error: 'fwrite' was not declared in this scope
     size_t rv = fwrite(msg, 1, length, output_handle_);
                                                      ^
../deps/v8/src/log-utils.h:112:26: error: 'fflush' was not declared in this scope
     fflush(output_handle_);
                          ^
../deps/v8/src/log-utils.cc: In member function 'void v8::internal::Log::MessageBuilder::Append(const char*, ...)':
../deps/v8/src/log-utils.cc:118:24: error: invalid conversion from 'va_list {aka char*}' to 'int' [-fpermissive]
   AppendVA(format, args);
                        ^
In file included from ../deps/v8/src/log-utils.cc:5:0:
../deps/v8/src/log-utils.h:64:10: error:   initializing argument 2 of 'void v8::internal::Log::MessageBuilder::AppendVA(const char*, int)' [-fpermissive]
     void AppendVA(const char* format, va_list args);
          ^
../deps/v8/src/log-utils.cc: At global scope:
../deps/v8/src/log-utils.cc:124:6: error: prototype for 'void v8::internal::Log::MessageBuilder::AppendVA(const char*, va_list)' does not match any in class 'v8::internal::Log::MessageBuilder'
 void Log::MessageBuilder::AppendVA(const char* format, va_list args) {
      ^
In file included from ../deps/v8/src/log-utils.cc:5:0:
../deps/v8/src/log-utils.h:64:10: error: candidate is: void v8::internal::Log::MessageBuilder::AppendVA(const char*, int)
     void AppendVA(const char* format, va_list args);
          ^   
deps/v8/tools/gyp/v8_base.target.mk:417: recipe for target '/usr/ports/www/node/work/node-v5.2.0/out/Release/obj.target/v8_base/deps/v8/src/log-utils.o' failed
gmake[1]: *** [/usr/ports/www/node/work/node-v5.2.0/out/Release/obj.target/v8_base/deps/v8/src/log-utils.o] Error 1
gmake[1]: Leaving directory '/usr/ports/www/node/work/node-v5.2.0/out'
Makefile:45: recipe for target 'node' failed
gmake: *** [node] Error 2
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-28 08:43:58 UTC
I've been testing a fix for this today, it's about to land.

@Ryan what version of FreeBSD are you running? (uname -a)
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-28 08:45:56 UTC
This doesn't need maintainer approval
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-12-28 08:46:46 UTC
A commit references this bug:

Author: koobs
Date: Mon Dec 28 08:46:41 UTC 2015
New revision: 404617
URL: https://svnweb.freebsd.org/changeset/ports/404617

Log:
  www/node: Fix build on FreeBSD 9.x

  Patch log-utils.h in the in-tree v8 source code, allowing it to compile
  using G++ 4.8 on FreeBSD 9.x. The code unfortunately relies on compiler
  intrinsics instead of including the necessary standard headers for
  handling C-style I/O and variadic arguments in its internal logging
  functions.

  This commit log and the code changes were provided by:

  Brendan Molloy (fmtq via IRC) - Thank you!

  PR:		205401
  Reported by:	JSG (via freenode IRC)
  Approved by:	blanket (portmgr)

Changes:
  head/www/node/Makefile
  head/www/node/files/
  head/www/node/files/patch-deps_v8_src_log-utils.h
Comment 4 Ryan Frederick 2015-12-28 16:48:48 UTC
(In reply to Kubilay Kocak from comment #1)
I'm seeing this on FreeBSD 9.x as you noted.

Just tested the latest commit. The port now builds successfully.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-29 00:12:35 UTC
@Ryan thank you for the confirmation :)