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

Installation Issue #216

Closed
ChillFire22 opened this issue Dec 9, 2023 · 17 comments
Closed

Installation Issue #216

ChillFire22 opened this issue Dec 9, 2023 · 17 comments

Comments

@ChillFire22
Copy link

20231209_194011

I'm hoping to get some help if possible. I don't really understand where the problem is. It first asked dor ruby-dev in an error, then for libsqlite3-dev but now for this error I can't make out what the problem is.

@categulario
Copy link
Collaborator

I haven't seen this error before.

I actually ported timetrap to rust in case you want to try it out :P it is a binary and bundles sqlite so you don't actually need it in the system.

@ChillFire22
Copy link
Author

I haven't seen this error before.

I actually ported timetrap to rust in case you want to try it out :P it is a binary and bundles sqlite so you don't actually need it in the system.

Hey, thank you for mentioning that. I Got and its workint great. Thanks man

@patrickdavey
Copy link
Contributor

I fixed this locally by cloning the gem and bumping the sqlite dependency to the 2.x branch.

I did try @categulario's tiempo - and it's really nice, except for me I couldn't get the note-editing to work at all, and for me I still want that functionality.

@categulario
Copy link
Collaborator

@patrickdavey I'd like to take a closer look at your problem, of course this is not the space to discuss it. Do you mind opening an issue mentioning your setup? (OS (and version), Shell (and version))

@trliner
Copy link
Contributor

trliner commented Jun 7, 2024

I created a PR that fixes this issue by loosening the dependency on sqlite3: #217

@mrp4sten
Copy link

I think that I have the same error:

WARNING:  You don't have /root/.local/share/gem/ruby/3.0.0/bin in your PATH,
	 gem executables will not run.
Building native extensions. This could take a while...
ERROR:  Error installing timetrap:
	ERROR: Failed to build gem native extension.

    current directory: /root/.local/share/gem/ruby/3.0.0/gems/sqlite3-1.4.4/ext/sqlite3
/usr/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for rb_integer_pack()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
checking for sqlite3_open_v2()... yes
checking for sqlite3_prepare_v2()... yes
checking for sqlite3_int64 in sqlite3.h... yes
checking for sqlite3_uint64 in sqlite3.h... yes
creating Makefile

current directory: /root/.local/share/gem/ruby/3.0.0/gems/sqlite3-1.4.4/ext/sqlite3
make DESTDIR\= sitearchdir\=./.gem.20240617-18356-fgimp2 sitelibdir\=./.gem.20240617-18356-fgimp2 clean

current directory: /root/.local/share/gem/ruby/3.0.0/gems/sqlite3-1.4.4/ext/sqlite3
make DESTDIR\= sitearchdir\=./.gem.20240617-18356-fgimp2 sitelibdir\=./.gem.20240617-18356-fgimp2
compiling aggregator.c
compiling backup.c
compiling database.c
database.c: In function ‘exec_batch’:
database.c:748:57: error: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type [-Wincompatible-pointer-types]
  748 |     status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         int (*)(VALUE,  int,  char **, char **) {aka int (*)(long unsigned int,  int,  char **, char **)}
In file included from ./sqlite3_ruby.h:25,
                 from database.c:1:
/usr/include/sqlite3.h:430:9: note: expected ‘int (*)(void *, int,  char **, char **)’ but argument is of type ‘int (*)(VALUE,  int,  char **, char **)’ {aka ‘int (*)(long unsigned int,  int,  char **, char **)’}
  430 |   int (*callback)(void*,int,char**,char**),  /* Callback function */
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:748:81: error: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast [-Wint-conversion]
  748 |     status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
      |                                                                                 ^~~~~~~~~~~~
      |                                                                                 |
      |                                                                                 VALUE {aka long unsigned int}
/usr/include/sqlite3.h:431:3: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
  431 |   void *,                                    /* 1st argument to callback */
      |   ^~~~~~
database.c:750:57: error: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type [-Wincompatible-pointer-types]
  750 |     status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         int (*)(VALUE,  int,  char **, char **) {aka int (*)(long unsigned int,  int,  char **, char **)}
/usr/include/sqlite3.h:430:9: note: expected ‘int (*)(void *, int,  char **, char **)’ but argument is of type ‘int (*)(VALUE,  int,  char **, char **)’ {aka ‘int (*)(long unsigned int,  int,  char **, char **)’}
  430 |   int (*callback)(void*,int,char**,char**),  /* Callback function */
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:750:84: error: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast [-Wint-conversion]
  750 |     status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
      |                                                                                    ^~~~~~~~~~~~
      |                                                                                    |
      |                                                                                    VALUE {aka long unsigned int}
/usr/include/sqlite3.h:431:3: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
  431 |   void *,                                    /* 1st argument to callback */
      |   ^~~~~~
make: *** [Makefile:246: database.o] Error 1

make failed, exit code 2

Gem files will remain installed in /root/.local/share/gem/ruby/3.0.0/gems/sqlite3-1.4.4 for inspection.
Results logged to /root/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/sqlite3-1.4.4/gem_make.out

@mrp4sten
Copy link

Consider that I've already install the dependencies:

  • sequel
  • sqlite3

@trliner
Copy link
Contributor

trliner commented Jun 19, 2024

I think that I have the same error:

@mrp4sten Have you tried installing from the master branch after #217 was merged?

@ecuasonic
Copy link

ecuasonic commented Sep 10, 2024

@mrp4sten I got the same error. Spent more than 30 minutes trying to figure out sqlite-devel and sqlite3 (1.4.2 vs 2.0.4). I give up.

@mrp4sten
Copy link

@trliner I tried to install timetrap using gem

gem install rdoc
gem install timetrap

Im using Arch btw (I dont try to install on other distro like based on debian or fedora)

      /\           OS: Arch Linux x86_64
     /  \          Kernel: Linux 6.10.10-arch1-1
    /    \         Shell: zsh 5.9
   /      \       󰏖 Packages: 891 (pacman)
  /   ,,   \       CPU: 13th Gen Intel(R) Core(TM) i7-13650HX (20) @ 4.90 GHz
 /   |  |   \     󰾲 GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile [Discrete]
/_-''    ''-_\    󰾲 GPU: Intel Raptor Lake-S UHD Graphics @ 1.55 GHz [Integrated]
                   Memory: 4.97 GiB / 31.04 GiB (16%)

@mrp4sten
Copy link

@ecuasonic sorry dude. I hope you can resolve this issue as it has been a few months and we have not received an answer or fix.

@mrp4sten
Copy link

Im going to test this time tracker btw https://tiempo.categulario.xyz/#

@dechimp
Copy link
Collaborator

dechimp commented Sep 22, 2024

I emailed @samg to try to get privileges to release the gem on RubyGems.org. If I don't get any response, I might have to release the gem under a different name.

@dechimp
Copy link
Collaborator

dechimp commented Oct 2, 2024

Just an update, @samg emailed me saying he will transfer ownership of the gem on RubyGems.org as soon as he has the time. In the meantime I've added some instructions on building/installing the latest master from source.

@dechimp
Copy link
Collaborator

dechimp commented Oct 7, 2024

I received gem access and I released 1.15.4. This is my first time releasing a gem so please let me know if I made any mistakes. Thanks.

@trliner
Copy link
Contributor

trliner commented Oct 8, 2024

@dechimp The 1.15.4 release is working for me. Thanks!

@dechimp
Copy link
Collaborator

dechimp commented Oct 8, 2024

Worked for me when I installed it. Marking ticket as closed for now. Please comment if there are any issues.

@dechimp dechimp closed this as completed Oct 8, 2024
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

7 participants