hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

FreeBSD build - isset macro and pthread issues

Open louisehu opened this issue 14 years ago • 3 comments

I've got strange error messages while build latest git sources on FreeBSD 8.1 with GCC 4.3 (same on FreeBSD 8.2 and GCC 4.4):

[ 13%] Built target timelib
Scanning dependencies of target hphp_runtime_static
[ 13%] Building CXX object src/CMakeFiles/hphp_runtime_static.dir/runtime/base/builtin_functions.cpp.o
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:1088:35: error: macro "isset" requires 2 arguments, but only 1 given
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:1096:66: error: macro "isset" passed 3 arguments, but takes just 2

Another "pthread" issue:

In file included from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/eval/debugger/debugger_proxy.h:22,
                 from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/eval/debugger/debugger.h:21,
                 from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:25:
/opt/doxcore/environment/hiphop/hiphop-php/src/util/async_func.h: In static member function 'static void* HPHP::AsyncFuncImpl::ThreadFunc(void*)':
/opt/doxcore/environment/hiphop/hiphop-php/src/util/async_func.h:111: error: 'pthread_getattr_np' was not declared in this scope
In file included from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/base_includes.h:26,
                 from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/ext/ext_process.h:21,
                 from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:27:
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/global_array_wrapper.h: In member function 'virtual HPHP::ArrayData* HPHP::GlobalArrayWrapper::nonSmartCopy() const':
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/global_array_wrapper.h:78: warning: no return statement in function returning non-void
In file included from /opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:33:
/opt/doxcore/environment/hiphop/hiphop-php/src/util/process.h: In static member function 'static pid_t HPHP::Process::GetThreadPid()':
/opt/doxcore/environment/hiphop/hiphop-php/src/util/process.h:122: error: 'SYS_gettid' was not declared in this scope
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp: At global scope:
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:1087: error: expected unqualified-id before 'const'
/opt/doxcore/environment/hiphop/hiphop-php/src/runtime/base/builtin_functions.cpp:1087: error: expected `)' before 'const'
...

louisehu avatar Jan 09 '12 08:01 louisehu

The "isset macro" issue should be fixed by a

#ifdef __FreeBSD__
# ifdef isset
#  undef isset
# endif
#endif

code in file "src/runtime/base/builtin_functions.cpp" ...

louisehu avatar Jan 09 '12 14:01 louisehu

The "pthread_getattr_np" issue occure by missing function name and implementation in FreeBSD system...

louisehu avatar Jan 09 '12 14:01 louisehu

We're closing out all bugs older than 2 months. http://www.hiphop-php.com/wp/?p=575

If this is still an issue, please re-open it, and in order of goodness:

  1. Give detailed repro steps
  2. Write a test case in hphp/tests/quick (run it with hphp/tests/run) and send the pull request
  3. Fix it in a pull request

ptarjan avatar May 13 '13 21:05 ptarjan