Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2024, 10:07 AM   #1
loveheaven
Junior Member
loveheaven began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2024
Device: android
Stuck on build. Is my machine_spec right?

I use ubuntu 22.04, Python3.10.12. I cloned the latest source code and build calibre at the master branch and bypy at the commit on Aug 10 ( because bypy will need python 3.12 if I use bypy after the commit on Aug 10).

When I executed ./setup.py bootstrap, everything is okay. I installed all the libraries needed. Then when I executed ./setup.py build_dep linux, it raised an error: FileNotFoundError: [Errno 2] No such file or directory: '/data/share/calibre/bypy/b/linux/64/vm/machine-spec'.

so I created my own machine-spec like this :
-machine q35 -net user,hostfwd=tcp::9090-:22

it raise another error:
subprocess.TimeoutExpired: Command '['ssh', '-p', '9090', '-o', 'ConnectTimeout=30', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'LogLevel=ERROR', 'kovid@localhost', 'date']' timed out after 10 seconds


please tell me is my machine-spec right??

thanks
loveheaven is offline   Reply With Quote
Old 12-31-2024, 10:34 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,363
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why are you trying to use bypy at all? You can simply build from source and run. bypy is only needed to create release builds.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-02-2025, 03:16 AM   #3
loveheaven
Junior Member
loveheaven began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2024
Device: android
Quote:
Originally Posted by kovidgoyal View Post
Why are you trying to use bypy at all? You can simply build from source and run. bypy is only needed to create release builds.
it is because README.md told me I should execute "./setup.py build_dep linux" to build calibre binaries. so now it seems that I should follow "Development" section of README.md not "Building calibre binaries" section of README.md. right??

now I tried to follow "Development" section of README.md in my macbook.
after I executed "calibre-debug -g", I got the following error:

calibre 7.23* embedded-python: True
macOS-14.4.1-arm64-arm-64bit Darwin ('64bit', '')
('Darwin', '23.4.0', 'Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000')
Python 3.11.5
OSX: ('14.4.1', ('', '', ''), 'arm64')
Interface language: None
EXE path: /Applications/calibre.app/Contents/MacOS/calibre-debug
Successfully initialized third party plugins: EpubMerge (3, 2, 0)
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 42, in <module>
File "site.py", line 38, in main
File "/Users/alex/Documents/sourcecode/calibre/src/calibre/debug.py", line 237, in main
calibre(['calibre'] + args[1:])
File "/Users/alex/Documents/sourcecode/calibre/src/calibre/gui_launch.py", line 73, in calibre
from calibre.gui2.main import main
File "/Users/alex/Documents/sourcecode/calibre/src/calibre/gui2/main.py", line 11, in <module>
import apsw
File "bypy-importer.py", line 127, in create_module
ImportError: dlopen(/Applications/calibre.app/Contents/Frameworks/plugins/apsw.__init__.so, 0x0002): Symbol not found: _sqlite3_enable_load_extension
Referenced from: <D463836C-AD17-3C75-B33A-F94E93EB869D> /Applications/calibre.app/Contents/Frameworks/plugins/apsw.__init__.so
Expected in: <877868A7-B883-3A57-8F35-4DBEF7386DC1> /usr/lib/libsqlite3.dylib

so how should I fix it?
loveheaven is offline   Reply With Quote
Old 01-02-2025, 06:19 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,363
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What is your end goal here? If you want to hack on calibre all you need to do is
set one env var to point to the location of the source code.

See https://manual.calibre-ebook.com/develop.html
kovidgoyal is offline   Reply With Quote
Old 01-02-2025, 09:13 AM   #5
loveheaven
Junior Member
loveheaven began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2024
Device: android
Quote:
Originally Posted by kovidgoyal View Post
What is your end goal here? If you want to hack on calibre all you need to do is
set one env var to point to the location of the source code.

See https://manual.calibre-ebook.com/develop.html
I want to add some functions to Ebook-edit and I can use these functions in the editor I launch by right-click an EPUB file and select the menu "Open with ebook-edit" in the MacOS system menu.
loveheaven is offline   Reply With Quote
Advert
Old 01-02-2025, 10:27 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,363
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by loveheaven View Post
I want to add some functions to Ebook-edit and I can use these functions in the editor I launch by right-click an EPUB file and select the menu "Open with ebook-edit" in the MacOS system menu.
Yes you can do that with the development method, though you dont even need that you can create editor plugins.

https://manual.calibre-ebook.com/creating_plugins.html

And see some of the existing editor plugins for examples
kovidgoyal is offline   Reply With Quote
Old 01-03-2025, 02:02 AM   #7
loveheaven
Junior Member
loveheaven began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Dec 2024
Device: android
Quote:
Originally Posted by kovidgoyal View Post
Yes you can do that with the development method, though you dont even need that you can create editor plugins.

https://manual.calibre-ebook.com/creating_plugins.html

And see some of the existing editor plugins for examples

Thank you, Kovid, you are very nice.
now I have modified the source code of Calibre and I can see the modification I want when I executed "calibre-debug --edit-book". but I cannot publish the modification into the installed calibre's book editor in MacOS. so when I launch the calibre's book editor from MacOS's system context menu, it is still the default book editor without my modification.
How can I publish the modification?
loveheaven is offline   Reply With Quote
Old 01-03-2025, 03:20 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,363
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Set the environment variable CALIBRE_DEVELOP_FROM system wide not just in your shell.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
0.9.4 build errors seanos Sigil 4 03-14-2016 10:50 PM
Touch [Solution] Are you stuck on the older build of firmware 1.9.16 ? Koboyashi Kobo Reader 6 03-23-2012 03:39 AM
Build my own dictionary petervdb PocketBook 1 01-26-2012 08:00 AM
0.6.0b1 build help WayneD Calibre 5 06-01-2009 08:00 PM


All times are GMT -4. The time now is 03:01 AM.


MobileRead.com is a privately owned, operated and funded community.