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

examples/database/mysql.v fails on MacOS #20475

Open
AllanCochrane opened this issue Jan 10, 2024 · 2 comments
Open

examples/database/mysql.v fails on MacOS #20475

AllanCochrane opened this issue Jan 10, 2024 · 2 comments

Comments

@AllanCochrane
Copy link

AllanCochrane commented Jan 10, 2024

V doctor:

V full version: V 0.4.4 89f06d3.4640627
OS: macos, macOS, 14.1, 23B74
Processor: 16 cpus, 64bit, little endian, Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz

getwd: /Users/allancochrane/Vlang/v/examples/database
vexe: /Users/allancochrane/Vlang/v/v
vexe mtime: 2024-01-10 19:07:13

vroot: OK, value: /Users/allancochrane/Vlang/v
VMODULES: OK, value: /Users/allancochrane/.vmodules
VTMP: OK, value: /tmp/v_501

Git version: git version 2.42.0
Git vroot status: 0.4.4-11-g46406277-dirty
.git/config present: true

CC version: Apple clang version 15.0.0 (clang-1500.1.0.2.5)
thirdparty/tcc status: thirdparty-macos-amd64 46662e20

What did you do?
v -g -o vdbg cmd/v && vdbg mysql.v

import db.mysql

#flag macos -I/opt/brew/opt/mysql/include/mysql -Wl,-rpath /opt/brew/opt/mysql/lib -Wl,-rpath /opt/brew/Cellar/mysql-client/8.1.0/lib

fn main() {
	mut conn := mysql.connect(
		host: 'localhost'
		port: 3306
		username: 'root'
		password: 'xxxxxx'
		dbname: 'development'
	)!
	res := conn.query('show tables')!
	for row in res.rows() {
		println(row.vals.join(', '))
	}
	conn.close()
}

What did you expect to see?

A running program

What did you see instead?

==================
      _db__mysql__DB_use_result in mysql-11ecbf.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
...
==================
(Use `v -cg` to print the entire error message)

builder error: 
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@Avey777
Copy link

Avey777 commented May 23, 2024

#21555

@Avey777
Copy link

Avey777 commented May 24, 2024

On macos, using db.mysql has never been successful

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

2 participants