Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: i2c_smbus_write_word_data #1

Open
kepon85 opened this issue Sep 9, 2019 · 2 comments
Open

undefined symbol: i2c_smbus_write_word_data #1

kepon85 opened this issue Sep 9, 2019 · 2 comments

Comments

@kepon85
Copy link

kepon85 commented Sep 9, 2019

Hello,
I compiled and added i2c in extension but I get an error message when I try to run a command (i2cset for example)

A simple script :

<?php
i2cset(1, 0x04, 0x04, 0x61);
?>

Return :
php: symbol lookup error: /usr/lib/php/20180731/i2c.so: undefined symbol: i2c_smbus_write_word_data

If I test with your example I get:


root@pi0(rw):/opt/i2c# php i2c.php 
Functions available in the test extension:
i2cget
i2cset

PHP Fatal error:  Uncaught Error: Call to undefined function confirm_i2c_compiled() in /opt/i2c/i2c.php:16
Stack trace:
#0 {main}
  thrown in /opt/i2c/i2c.php on line 16

Do you have an idea to help me?

Thank you in advance for your support!
And thank you for this code!

David

@nineff
Copy link

nineff commented Mar 7, 2020

likewise, i2c_smbus_read_word_data ist also undefined

@halfer
Copy link

halfer commented Apr 18, 2023

Looks like it is not particular to a specific PHP ext project, I get it on this separate repo: embedded-php/ext-i2c#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants