pbiggar / phc

A compiler for PHP
132 stars 37 forks source link

clang build issues #154

Closed pbiggar closed 8 years ago

pbiggar commented 9 years ago
What steps will reproduce the problem?
1. build using clang vs llvm
2.
3.

What is the expected output? What do you see instead?
no compile errors

What version of the product are you using? On what operating system?
phc 0.3.0.1, OSX 10.7.4 (Darwin 11.4.0)

Please provide any additional information below.
I'm currently trying to solve these issues to get phi to compile on OSX for fink.

so far I've had to run

perl -pi -e 's,insert,std::list\<_Tp\, _Alloc\>::insert,g' src/lib/List.h
perl -pi -e 's,push_back\(,std::list\<_Tp\, _Alloc\>::push_back\(,g' src/lib/List.h

and I'm struggling with one more

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I/sw/include -I/sw/include -I/sw/include
-I/sw/include/xercesc -I./src -I. -I./3rdparty/getopt -I./src/generated -isystem/sw/include/php5
-isystem/sw/include/php5/main -isystem/sw/include/php5/TSRM -isystem/sw/include/php5/Zend
-DDATADIR=\"/sw/share\" -DPKGLIBDIR=\"/sw/lib/phc\" -Wall -Wno-overloaded-virtual -I/sw/include
-Wextra -Wno-unused-parameter -Wno-write-strings -Wno-deprecated -g -O2 -c src/optimize/CFG_visitor.cpp
 -fno-common -DPIC -o .libs/CFG_visitor.o
In file included from src/optimize/Alias_name.cpp:13:
In file included from src/optimize/wpa/Aliasing.h:21:
src/optimize/wpa/Points_to.h:315:20: error: member reference base type
      'Source_type *const' is not a structure or union
                cdebug << source.str() << " -> " << target.str();
                          ~~~~~~ ^
src/optimize/wpa/Points_to.h:315:46: error: member reference base type
      'Target_type *const' is not a structure or union
                cdebug << source.str() << " -> " << target.str();
                                                    ~~~~~~ ^
2 errors generated.

To solve that one I have been just commenting out line 315 in src/optimize/wpa/Points_to.h
though I don't like this solution so I thought I'd report them.  I have other darwin
related issues but I'll file separate ticked for them.

Original issue reported on code.google.com by thesin on 2012-06-19 15:00:54

pbiggar commented 9 years ago
Maybe use source->str() instead?

Original issue reported on code.google.com by paul.biggar on 2012-06-19 16:50:13

pbiggar commented 9 years ago
thanks I'll give that a shot right now and reply back.  I'm working my way through the
tests now that i have it build and running so I may have more feedback shortly ;)

Original issue reported on code.google.com by thesin on 2012-06-19 16:51:53

pbiggar commented 9 years ago
tested and confirmed, replacing the . with -> allows compile

I'll see if I can figure out how to do a git pull request for these.

Original issue reported on code.google.com by thesin on 2012-06-19 17:00:44

pbiggar commented 9 years ago
figured it out, pull request for this is in

Original issue reported on code.google.com by thesin on 2012-06-19 17:25:10

pbiggar commented 8 years ago

Looks fixed.