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

Cross compile doesn't work #3785

Closed
prchal opened this issue Nov 22, 2023 · 0 comments · Fixed by #3813
Closed

Cross compile doesn't work #3785

prchal opened this issue Nov 22, 2023 · 0 comments · Fixed by #3813

Comments

@prchal
Copy link

prchal commented Nov 22, 2023

Describe the bug

On Ubuntu 22.04 cross compilation for arm has many errors of long int vs int.

Steps to reproduce

$ ./configure --host=arm-linux-gnueabi --disable-sdl --disable-ffmpeg --disable-v4l2 --disable-openh264 --disable-libwebrtc --disable-libyuv --disable-floating-point --disable-pjsua2
$ make dep
$ make lib`

PJSIP version

2.14

Context

$ uname -a
Linux prchalpc 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Log, call stack, etc

In file included from ../src/pj/pool_caching.c:21:
../src/pj/pool_caching.c: In function ‘cpool_dump_status’:
../src/pj/pool_caching.c:282:27: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘pj_size_t’ {aka ‘unsigned int’} [-Werror=format=]
  282 |     PJ_LOG(3,("cachpool", "   Capacity=%lu, max_capacity=%lu, used_cnt=%lu", \
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  283 |                              cp->capacity, cp->max_capacity, cp->used_count));
      |                              ~~~~~~~~~~~~
      |                                |
      |                                pj_size_t {aka unsigned int}
../include/pj/log.h:430:50: note: in definition of macro ‘pj_log_wrapper_3’
  430 |     #define pj_log_wrapper_3(arg)       pj_log_3 arg
      |                                                  ^~~
../src/pj/pool_caching.c:282:5: note: in expansion of macro ‘PJ_LOG’
  282 |     PJ_LOG(3,("cachpool", "   Capacity=%lu, max_capacity=%lu, used_cnt=%lu", \
      |     ^~~~~~
../src/pj/pool_caching.c:282:42: note: format string is defined here
  282 |     PJ_LOG(3,("cachpool", "   Capacity=%lu, max_capacity=%lu, used_cnt=%lu", \
      |                                        ~~^
      |                                          |
      |                                          long unsigned int
      |                                        %u
In file included from ../src/pj/pool_caching.c:21:
../src/pj/pool_caching.c:282:27: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘pj_size_t’ {aka ‘unsigned int’} [-Werror=format=]
  282 |     PJ_LOG(3,("cachpool", "   Capacity=%lu, max_capacity=%lu, used_cnt=%lu", \
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  283 |                              cp->capacity, cp->max_capacity, cp->used_count));
      |                                            ~~~~~~~~~~~~~~~~
      |                                              |
      |                                              pj_size_t {aka unsigned int}

and many times repeated...
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

Successfully merging a pull request may close this issue.

1 participant