Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Can't compile PHP 5.6.1 from source

General Tech Bugs & Fixes
Max. 2000 characters
Replies

usr_profile.png
Liza Sain

User

( 6 months ago )

 

I'm trying to compile PHP 5.6.1 on my MacBook Pro but I can't seem to get pass all the problems.

I get stuck with the error message at make:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:138: recipe for target 'libs/libphp5.bundle' failed
make: *** [libs/libphp5.bundle] Error 1

I compiled the Apache v. 2.4.10 from source with configure options:

sudo ./configure --prefi=/usr/local/apache2 --enable-so --enable-modules=most

Apache is working normally.

My configure options for PHP:

sudo ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --disable-ipv6 --enable-dtrace --with-zlib --with-curl=/usr/local/cURL --enable-ftp --enable-mbstring --with-mcrypt=/usr/local/libmcrypt --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-opcache=no

I can't get pass the make process. I've tried everything: sudo make clean doesn't help. I've reinstalled Xcode and CommandLineTools. And tried everything that I could find searching the web but to no prevail.

Does anyone know why it doesn't work?

My last resort would be reinstall mavericks (if anything was overwritten or broken) but that is the last resort I want to take and start over again on a fresh copy.

Thanks for all your help.

Pending my research: PHP only throws the error when trying to configure it with mysqli.

Undefined symbols for architecture x86_64:
  "_dns_free", referenced from:
      _zif_dns_check_record in dns.o
      _zif_dns_get_record in dns.o
      _zif_dns_get_mx in dns.o
  "_dns_open", referenced from:
      _zif_dns_check_record in dns.o
      _zif_dns_get_record in dns.o
      _zif_dns_get_mx in dns.o
  "_dns_search", referenced from:
      _zif_dns_check_record in dns.o
      _zif_dns_get_record in dns.o
      _zif_dns_get_mx in dns.o
  "_res_9_dn_expand", referenced from:
      _php_parserr in dns.o
      _zif_dns_get_mx in dns.o
  "_res_9_dn_skipname", referenced from:
      _zif_dns_get_record in dns.o
      _zif_dns_get_mx in dns.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1

What am I missing?

usr_profile.png
Priyanka Chadda

User

( 6 months ago )

Managed to find the problem.

Remove the previous installation and then:

--with-mysqli : I used the native MySql driver ( omitted the folder path )

So when you forget to add a module to your initial compilation and you are stuck with some kind a freaky error delete the old instance that successfully installed and do the ./configure ; make clean ; make ; make install just to be sure:)

Thanks goes to David Parker for helping me with the problem.

Thanks David.

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif