Page 7 of 8

Re: Смотрелка pdf

Posted: Thu Sep 03, 2015 12:34 am
by punk_joker
Вернулся к попыткам собрать программу. Из за чего проблема?

Re: Смотрелка pdf

Posted: Thu Sep 03, 2015 1:10 am
by ashmew2
This line from the logs (among other lines):

/tmp/ccXBt4m2.o: In function `fz_flush_warnings':
cmapdump.c:(.text+0x108): undefined reference to `fprintf'

means that the linker (ld) is not able to find a function(symbol) called "fprintf" which was used in the file cmapdump.c . Even all the other errors of undefined symbols (such as malloc, str* functions, free, etc) suggest that you are missing a linker object for libc .

I looked at the Makefile, Can you try changing the makefile at kolibrios/contrib/media/updf/Makefile by this ?

LDFLAGS = -Tinclude/scripts/menuetos_app_v01.ld -nostdlib -Linclude/lib

(remove the space between -L and include/lib) and try running make again.

Re: Смотрелка pdf

Posted: Thu Sep 03, 2015 2:07 am
by punk_joker
Попробовал сначала
Spoiler:root@debian:/home/punk-joker/Work/kolibrios_svn/contrib/media/updf# make
LINK build/pdfdraw
ld: skipping incompatible include/lib/libfreetype2.a when searching for -lfreetype2
ld: cannot find -lfreetype2
ld: skipping incompatible include/lib/libpng.a when searching for -lpng
ld: cannot find -lpng
ld: skipping incompatible include/lib/libjbig2dec.a when searching for -ljbig2dec
ld: cannot find -ljbig2dec
ld: skipping incompatible include/lib/libjpeg.a when searching for -ljpeg
ld: cannot find -ljpeg
ld: skipping incompatible include/lib/libopenjpeg.a when searching for -lopenjpeg
ld: cannot find -lopenjpeg
ld: skipping incompatible include/lib/libz.a when searching for -lz
ld: cannot find -lz
ld: skipping incompatible include/lib/libm.a when searching for -lm
ld: cannot find -lm
ld: skipping incompatible include/lib/libc.a when searching for -lc
ld: cannot find -lc
Makefile:45: ошибка выполнения рецепта для цели «build/pdfdraw»
make: *** [build/pdfdraw] Ошибка 1
Sourcer ранее писал по этому поводу, но я не могу понять причин. Ведь насколько я понял, Leency ранее собрал программу с этим же makefile'ом

Re: Смотрелка pdf

Posted: Thu Sep 03, 2015 2:39 am
by ashmew2
Hmm, Looks like there's some kind of a mixed library linkage madness going on here. If the compiler is skipping "incompatible" library files that we want to get into the executable, then we are shit outta luck :D

FWIW, I think it's better to compile this using newlib instead of multiple toolchains floating together. Someone needs to take this over!

Re: Смотрелка pdf

Posted: Sun Sep 06, 2015 12:00 am
by Ray
Почисти от объектных файлов и пересобери всё заново.

Re: Смотрелка pdf

Posted: Tue Sep 08, 2015 3:51 pm
by Leency
VitrualBox image with uPDF
Download

How to use it to build uPDF:
1. download archive and unpack it
2. open Xubuntu.vbox by double click (or use VBox menu "Add" http://prntscr.com/8dz9u8 )
3. run VM
4. go to /home/leency/updf
5. run BuildUPDF.sh http://prntscr.com/8dzemm
-> you'll get compiled binary file /home/leency/build/mupdf

I use Dropbox to send file from vitrual machine to my host system, so after compilation binary copies to /home/leency/Dropbox folder.
If you need root password for current vm then please ask me by private message.

Re: Смотрелка pdf

Posted: Sun Nov 15, 2015 6:13 pm
by Wildwest

Re: Смотрелка pdf

Posted: Fri Nov 11, 2016 11:42 am
by 0CodErr
Leency « Ср ноя 09, 2016 9:26 pm » Siemargl: FB2reader надо добавить, а вот uPDF нет смысла добавлять, т.к. он запускается только с параметром - поддержки OpenDial нету
Просто как вариант(по крайней мере я так делаю), с помощью viewtopic.php?f=9&t=2486&p=53443#p53443
Запускается скриптом для SHELL, в котором

Code: Select all

LOD *pdf,xps*/hd0/1/mupdf

Re: Смотрелка pdf

Posted: Fri Nov 11, 2016 1:57 pm
by Leency
Ничего себе! Спасибо, схоронил, надо будет прикрутить.

Re: Смотрелка pdf

Posted: Wed Oct 17, 2018 1:04 am
by Leency
VitrualBox image with uPDF
Updated, now in Puppy Linux, 385 Mb.
https://drive.google.com/file/d/1vxfdOO ... sp=sharing

Re: Смотрелка pdf

Posted: Sun Oct 25, 2020 11:50 am
by maxcodehack
UPD
Такая же ошибка была у punk_joker'а:
Когда я закомментировал обьявления функций в updf/include/pc.h, ошибок стало меньше:
Новый файл pc.h:
Spoiler:

Code: Select all

/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_Inline_pc_h_
#define __dj_include_Inline_pc_h_

#ifdef __GNUC__

#ifdef __cplusplus
extern "C" {
#endif
/*
extern inline unsigned char inportb (unsigned short _port)
{
 unsigned char __ret;
 __asm__ __volatile__("inb %%dx,%%al":"=a"(__ret):"d"(_port));
 return __ret;
}

extern __inline__ unsigned short inportw (unsigned short _port)
{
 unsigned short __ret;
 __asm__ __volatile__("inw %%dx,%%ax":"=a"(__ret):"d"(_port));
 return __ret;
}

extern __inline__ unsigned long inportl (unsigned short _port)
{
 unsigned long __ret;
 __asm__ __volatile__("inl %%dx,%%eax":"=a"(__ret):"d"(_port));
 return __ret;
}

extern __inline__ void outportb (unsigned short _port, unsigned char _data)
{
 __asm__ __volatile__("outb %%al,%%dx"::"a"(_data),"d"(_port));
}

extern __inline__ void outportw (unsigned short _port, unsigned short _data)
{
 __asm__ __volatile__("outw %%ax,%%dx"::"a"(_data),"d"(_port));
}

extern __inline__ void outportl (unsigned short _port, unsigned long _data)
{
 __asm__ __volatile__("outl %%eax,%%dx"::"a"(_data),"d"(_port));
}
*/
#ifdef __cplusplus
}
#endif

#endif

#endif
Новый лог:
Spoiler:

Code: Select all

    LINK build/mupdf
ld: skipping incompatible include/lib/libfreetype2.a when searching for -lfreetype2
ld: cannot find -lfreetype2
ld: skipping incompatible include/lib/libpng.a when searching for -lpng
ld: cannot find -lpng
ld: skipping incompatible include/lib/libjbig2dec.a when searching for -ljbig2dec
ld: cannot find -ljbig2dec
ld: skipping incompatible include/lib/libjpeg.a when searching for -ljpeg
ld: cannot find -ljpeg
ld: skipping incompatible include/lib/libopenjpeg.a when searching for -lopenjpeg
ld: cannot find -lopenjpeg
ld: skipping incompatible include/lib/libz.a when searching for -lz
ld: cannot find -lz
ld: skipping incompatible include/lib/libm.a when searching for -lm
ld: cannot find -lm
ld: skipping incompatible include/lib/libc.a when searching for -lc
ld: cannot find -lc
Makefile:111: recipe for target 'build/mupdf' failed
make: *** [build/mupdf] Error 1
Возможно, это связано с
Кто-то wrote:Но ты собираешь 32-битный бинарник, а библиотеки у тебя 64-битные.
OLD
Попробовал собрать uPDF, но что то не так, ругается компилятор. Так же удивило, что до сих пор на menuetlibc, а не newlibc
Лог:

Re: Смотрелка pdf

Posted: Mon Oct 26, 2020 10:03 am
by maxcodehack
Del

Re: Смотрелка pdf

Posted: Sat Oct 31, 2020 7:19 pm
by maxcodehack
Del

Re: Смотрелка pdf

Posted: Sun Nov 01, 2020 11:46 am
by maxcodehack
В чем дело может быть? На одном линуксе собирается на другом нет.

Re: Смотрелка pdf

Posted: Tue Nov 17, 2020 2:39 am
by Leency
У мя тоже не на всех линуксах собиралось. Там прикол наверно в разных версиях GCC.