pbiggar / phc

A compiler for PHP
132 stars 37 forks source link

phc installation issues #158

Closed pbiggar closed 8 years ago

pbiggar commented 9 years ago
What steps will reproduce the problem?
1. ./configure
2. make
3.

What is the expected output? What do you see instead?
I expect make to finish without errors.
I see this:
/bin/bash ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.  -I/usr/include
  -I./src -I. -I./3rdparty/getopt -I./src/generated -DDATADIR=\"/usr/local/share\"
-DPKGLIBDIR=\"/usr/local/lib/phc\" -Wall  -Wextra -Wno-unused-parameter -Wno-write-strings
-Wno-deprecated -g -O2 -MT Dominance.lo -MD -MP -MF .deps/Dominance.Tpo -c -o Dominance.lo
`test -f 'src/optimize/ssa/Dominance.cpp' || echo './'`src/optimize/ssa/Dominance.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/usr/include -I./src -I. -I./3rdparty/getopt
-I./src/generated -DDATADIR=\"/usr/local/share\" -DPKGLIBDIR=\"/usr/local/lib/phc\"
-Wall -Wextra -Wno-unused-parameter -Wno-write-strings -Wno-deprecated -g -O2 -MT Dominance.lo
-MD -MP -MF .deps/Dominance.Tpo -c src/optimize/ssa/Dominance.cpp  -fPIC -DPIC -o .libs/Dominance.o
src/optimize/ssa/Dominance.cpp: In function 'void calculate_dominance(Dominance*, Graph_type&,
vertex_t) [with Graph_type = boost::reverse_graph<boost::adjacency_list<phc_listS,
phc_listS, boost::bidirectionalS, boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*> > >, boost::property<edge_cfg_edge_t,
Edge*>, boost::no_property, phc_listS> >, vertex_t = void*]':
src/optimize/ssa/Dominance.cpp:152:57:   instantiated from here
src/optimize/ssa/Dominance.cpp:111:4: error: conversion from 'boost::iterator_reference<boost::transform_iterator<boost::detail::reverse_graph_edge_descriptor_maker<boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*> >, boost::detail::out_edge_iter<std::_List_iterator<boost::detail::sei_<void*,
std::_List_iterator<boost::list_edge<void*, boost::property<edge_cfg_edge_t, Edge*>
> >, boost::property<edge_cfg_edge_t, Edge*> > >, void*, boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*>, long int>, boost::use_default, boost::use_default> >::type {aka boost::detail::reverse_graph_edge_descriptor<boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*> >}' to non-scalar type 'edge_t {aka boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*>}' requested
src/optimize/ssa/Dominance.cpp:113:39: error: no matching function for call to 'source(edge_t&,
boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*> > >, boost::property<edge_cfg_edge_t,
Edge*>, boost::no_property, phc_listS> >&)'
src/optimize/ssa/Dominance.cpp:113:39: note: candidates are:
/usr/include/boost/graph/reverse_graph.hpp:281:1: note: template<class Edge, class
BidirectionalGraph, class GRef> typename boost::graph_traits<BidirectionalGraph>::vertex_descriptor
boost::source(const boost::detail::reverse_graph_edge_descriptor<Edge>&, const boost::reverse_graph<BidirectionalGraph,
GRef>&)
/usr/include/boost/graph/adjacency_list.hpp:530:3: note: template<class Directed, class
Vertex, class OutEdgeListS, class VertexListS, class DirectedS, class VertexProperty,
class EdgeProperty, class GraphProperty, class EdgeListS> Vertex boost::source(const
boost::detail::edge_base<Directed, Vertex>&, const boost::adjacency_list<OutEdgeListS,
VertexListS, DirectedS, VertexProperty, EdgeProperty, GraphProperty, EdgeListS>&)
/usr/include/boost/graph/graph_traits.hpp:350:5: note: template<class T, class G> T
std::source(std::pair<_FIter, _FIter>, const G&)
make[2]: *** [Dominance.lo] Error 1

What version of the product are you using? On what operating system?
Ubunutu (12.04 LTS)
phc-0.3.0.1 from git hub 
libboost1.48-all-dev
php5-5.3.10 with --enable-embed compiled into it.

Please provide any additional information below.
I've tried many different configurations and most of the time I got the regular could
not link to libboost errors, I finally got past them by installing the latest libboost
but now I'm getting make errors on Dominance.cpp any help on this would be greatly
appreciated.

Original issue reported on code.google.com by deefactorial on 2012-11-06 23:19:37

pbiggar commented 9 years ago
Oh I also linked to my native libtool by doing :
ln -s /usr/bin/libtool ./libtool 
in the phc dir. The configure script overwrites ./libtool but it gets through the libboost
errors.
My libtool is version 2.4.2

Original issue reported on code.google.com by deefactorial on 2012-11-07 17:28:32

pbiggar commented 9 years ago
Hi,

I have the same error during compilation.

My version is:
FreeBSD 9.1
phc 0.3.0.1
libboost 1.48
php 5.4.10 with embed compilation

The full error is:
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.  -I/usr/local/include
-I./libltdl                                                      -I./src -I. -I./3rdparty/getopt
-I./src/generated                -isystem/usr/local/include/php -isystem/usr/local/include/php/main
-isystem/usr/local/include/php/TSRM -isystem/usr/local/include/php/Zend           

                -DDATADIR=\"/usr/local/share\" -DPKGLIBDIR=\"/usr/local/lib/phc\" 
                                                              -Wall  -Wextra -Wno-unused-parameter
-Wno-write-strings -Wno-deprecated -g -O2 -MT Dominance.lo -MD -MP -MF .deps/Dominance.Tpo
-c -o Dominance.lo `test -f 'src/optimize/ssa/Dominance.cpp' || echo './'`src/optimize/ssa/Dominance.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -I./libltdl -I./src
-I. -I./3rdparty/getopt -I./src/generated -isystem/usr/local/include/php -isystem/usr/local/include/php/main
-isystem/usr/local/include/php/TSRM -isystem/usr/local/include/php/Zend -DDATADIR=\"/usr/local/share\"
-DPKGLIBDIR=\"/usr/local/lib/phc\" -Wall -Wextra -Wno-unused-parameter -Wno-write-strings
-Wno-deprecated -g -O2 -MT Dominance.lo -MD -MP -MF .deps/Dominance.Tpo -c src/optimize/ssa/Dominance.cpp
 -fPIC -DPIC -o .libs/Dominance.o
In file included from /usr/local/include/boost/type_traits/aligned_storage.hpp:11,
                 from /usr/local/include/boost/type_traits.hpp:20,
                 from /usr/local/include/boost/graph/reverse_graph.hpp:13,
                 from src/optimize/ssa/Dominance.cpp:4:
/usr/local/include/boost/aligned_storage.hpp:90: warning: enumeral and non-enumeral
type in conditional expression
src/optimize/ssa/Dominance.cpp: In function 'void calculate_dominance(Dominance*, Graph_type&,
void*) [with Graph_type = boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS,
boost::bidirectionalS, boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>, const boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>&>]':
src/optimize/ssa/Dominance.cpp:152:   instantiated from here
src/optimize/ssa/Dominance.cpp:111: error: conversion from 'boost::detail::reverse_graph_edge_descriptor<boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*> >' to non-scalar type 'boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*>' requested
src/optimize/ssa/Dominance.cpp:113: error: no matching function for call to 'source(boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*>&, boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>, const boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>&>&)'
*** [Dominance.lo] Error code 1

Stop in /tmp/phc-0.3.0.1.
*** [all-recursive] Error code 1

Stop in /tmp/phc-0.3.0.1.
*** [all] Error code 1

Stop in /tmp/phc-0.3.0.1.

Original issue reported on code.google.com by firebolt31 on 2013-01-07 10:57:34

pbiggar commented 9 years ago
According to the manual i downgrade my php version to the last php 5.2.x (5.2.17)
But i have the same problem during compilation.

I try to change the phc version  using the svn version but i continue to have the same
erreor.
If anyone can solve the issue thanks to post the patch.

######################################
Error log during compilation:

/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.  -I/usr/local/include
-I./libltdl                                                      -I./src -I. -I./3rdparty/getopt
-I./src/generated                -isystem/usr/local/include/php -isystem/usr/local/include/php/main
-isystem/usr/local/include/php/TSRM -isystem/usr/local/include/php/Zend           

                -DDATADIR=\"/usr/local/share\" -DPKGLIBDIR=\"/usr/local/lib/phc\" 
                                                              -Wall  -Wextra -Wno-unused-parameter
-Wno-write-strings -Wno-deprecated -g -O2 -MT Dominance.lo -MD -MP -MF .deps/Dominance.Tpo
-c -o Dominance.lo `test -f 'src/optimize/ssa/Dominance.cpp' || echo './'`src/optimize/ssa/Dominance.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -I./libltdl -I./src
-I. -I./3rdparty/getopt -I./src/generated -isystem/usr/local/include/php -isystem/usr/local/include/php/main
-isystem/usr/local/include/php/TSRM -isystem/usr/local/include/php/Zend -DDATADIR=\"/usr/local/share\"
-DPKGLIBDIR=\"/usr/local/lib/phc\" -Wall -Wextra -Wno-unused-parameter -Wno-write-strings
-Wno-deprecated -g -O2 -MT Dominance.lo -MD -MP -MF .deps/Dominance.Tpo -c src/optimize/ssa/Dominance.cpp
 -fPIC -DPIC -o .libs/Dominance.o
In file included from /usr/local/include/boost/type_traits/aligned_storage.hpp:11,
                 from /usr/local/include/boost/type_traits.hpp:20,
                 from /usr/local/include/boost/graph/reverse_graph.hpp:13,
                 from src/optimize/ssa/Dominance.cpp:4:
/usr/local/include/boost/aligned_storage.hpp:90: warning: enumeral and non-enumeral
type in conditional expression
src/optimize/ssa/Dominance.cpp: In function 'void calculate_dominance(Dominance*, Graph_type&,
void*) [with Graph_type = boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS,
boost::bidirectionalS, boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>, const boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>&>]':
src/optimize/ssa/Dominance.cpp:152:   instantiated from here
src/optimize/ssa/Dominance.cpp:111: error: conversion from 'boost::detail::reverse_graph_edge_descriptor<boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*> >' to non-scalar type 'boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*>' requested
src/optimize/ssa/Dominance.cpp:113: error: no matching function for call to 'source(boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*>&, boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>, const boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>&>&)'
*** [Dominance.lo] Error code 1

Stop in /tmp/test_phc/phc-read-only.
*** [all-recursive] Error code 1

Stop in /tmp/test_phc/phc-read-only.
*** [all] Error code 1

Stop in /tmp/test_phc/phc-read-only.

######################################
OS:
FreeBSD testfb91 9.1-RELEASE FreeBSD 9.1-RELEASE #5: Fri Jan  4 13:11:16 CET 2013 
   root@testfb91:/usr/obj/usr/src/sys/testfb91Kernel  i386

GCC version:gcc (GCC) 4.2.1 20070831 patched [FreeBSD]

PHP version with --enable-embed:
PHP 5.2.17 (cli) (built: Jan  8 2013 08:34:14)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

BOOST version: 1.48

Original issue reported on code.google.com by firebolt31 on 2013-01-08 09:20:22

pbiggar commented 9 years ago
I have the same issue on Ubuntu 12.10. :-(

Original issue reported on code.google.com by mscdex on 2013-02-03 00:08:52

pbiggar commented 9 years ago
I have the same problem during compilation...
src/optimize/ssa/Dominance.cpp: In function 'void calculate_dominance(Dominance*, Graph_type&,
void*) [with Graph_type = boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS,
boost::bidirectionalS, boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>, const boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>&>]':                     
src/optimize/ssa/Dominance.cpp:142:   instantiated from here
src/optimize/ssa/Dominance.cpp:107: error: conversion from 'boost::detail::reverse_graph_edge_descriptor<boost::detail::edge_desc_impl<boost::bidirectional_tag,
void*> >' to non-scalar type 'edge_t' requested
src/optimize/ssa/Dominance.cpp:109: error: no matching function for call to 'source(edge_t&,
boost::reverse_graph<boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>, const boost::adjacency_list<phc_listS, phc_listS, boost::bidirectionalS,
boost::property<boost::vertex_index_t, int, boost::property<boost::vertex_color_t,
boost::default_color_type, boost::property<vertex_bb_t, Basic_block*, boost::no_property>
> >, boost::property<edge_cfg_edge_t, Edge*, boost::no_property>, boost::no_property,
phc_listS>&>&)'
make[2]: *** [Dominance.lo] Error 1
make[2]: Leaving directory `/usr/local/src/phc-0.3.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/phc-0.3.0.1'
make: *** [all] Error 2

My host infomation:
CentOS 6.3
phc-0.3.0.1
boost-1.41
gcc-4.4.7
php-5.3.23

Original issue reported on code.google.com by boytools on 2013-05-06 10:01:57

pbiggar commented 8 years ago

I think I've fixed all the boost errors.