[GH-ISSUE #3649] [APP BUG]: time.cpp:534:5: error: a type specifier is required for all declarations #1086

Closed
opened 2026-02-27 21:09:51 +03:00 by kerem · 6 comments
Owner

Originally created by @Martinfx on GitHub (Sep 25, 2025).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/3649

Checklist

  • I have searched for a similar issue in this repository and did not find one.
  • I am using an official build obtained from releases or updated one of those builds using its in-app updater.

Describe the Bug

Hi,
i build with version 0.11.0 and clang19 on FreeBSD 14.3 and i have problem with time.cpp:534:5: error: a type specifier is required for all declarations

hadps4.dir/src/core/libraries/kernel/time.cpp.o -MF CMakeFiles/shadps4.dir/src/core/libraries/kernel/time.cpp.o.d -o CMakeFiles/shadps4.dir/src/core/libraries/kernel/time.cpp.o -c /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:534:5: error: a type specifier is required for all declarations
  534 |     clock = std::make_unique<Common::NativeClock>();
      |     ^
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:535:5: error: a type specifier is required for all declarations
  535 |     initial_ptc = clock->GetUptime();
      |     ^
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:535:24: error: member reference base type 'clock_t ()' (aka 'int ()') is not a structure or union
  535 |     initial_ptc = clock->GetUptime();
      |                   ~~~~~^ ~~~~~~~~~
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:538:5: error: expected unqualified-id
  538 |     LIB_FUNCTION("yS8U2TGCe1A", "libkernel", 1, "libkernel", posix_nanosleep);
      |     ^
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/libs.h:11:5: note: expanded from macro 'LIB_FUNCTION'
   11 |     {                                                                                              \
      |     ^
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:539:5: error: expected unqualified-id
  539 |     LIB_FUNCTION("yS8U2TGCe1A", "libScePosix", 1, "libkernel", posix_nanosleep);
      |     ^
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/libs.h:11:5: note: expanded from macro 'LIB_FUNCTION'
   11 |     {                                                                                              \
      |     ^
/home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:540:5: error: expected unqualified-id
  540 |     LIB_FUNCTION("QcteRwbsnV0", "libkernel", 1, "libkernel", posix_usleep);
      |     ^

Reproduction Steps

  1. git clone
  2. cmake ..
  3. make

Expected Behavior

No response

Specify OS Version

FreeBSD 14.3-RELEASE

CPU

amd ryzen

GPU

nvidia 1060

Amount of RAM in GB

32

Originally created by @Martinfx on GitHub (Sep 25, 2025). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/3649 ### Checklist - [x] I have searched for a similar issue in this repository and did not find one. - [x] I am using an official build obtained from [releases](https://github.com/shadps4-emu/shadPS4/releases) or updated one of those builds using its in-app updater. ### Describe the Bug Hi, i build with version 0.11.0 and clang19 on FreeBSD 14.3 and i have problem with time.cpp:534:5: error: a type specifier is required for all declarations ``` hadps4.dir/src/core/libraries/kernel/time.cpp.o -MF CMakeFiles/shadps4.dir/src/core/libraries/kernel/time.cpp.o.d -o CMakeFiles/shadps4.dir/src/core/libraries/kernel/time.cpp.o -c /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:534:5: error: a type specifier is required for all declarations 534 | clock = std::make_unique<Common::NativeClock>(); | ^ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:535:5: error: a type specifier is required for all declarations 535 | initial_ptc = clock->GetUptime(); | ^ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:535:24: error: member reference base type 'clock_t ()' (aka 'int ()') is not a structure or union 535 | initial_ptc = clock->GetUptime(); | ~~~~~^ ~~~~~~~~~ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:538:5: error: expected unqualified-id 538 | LIB_FUNCTION("yS8U2TGCe1A", "libkernel", 1, "libkernel", posix_nanosleep); | ^ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/libs.h:11:5: note: expanded from macro 'LIB_FUNCTION' 11 | { \ | ^ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:539:5: error: expected unqualified-id 539 | LIB_FUNCTION("yS8U2TGCe1A", "libScePosix", 1, "libkernel", posix_nanosleep); | ^ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/libs.h:11:5: note: expanded from macro 'LIB_FUNCTION' 11 | { \ | ^ /home/maxfx/Documents/FreeBSD-Ports/shadps4/work/shadPS4-v.0.11.0/src/core/libraries/kernel/time.cpp:540:5: error: expected unqualified-id 540 | LIB_FUNCTION("QcteRwbsnV0", "libkernel", 1, "libkernel", posix_usleep); | ^ ``` ### Reproduction Steps 1. git clone 2. cmake .. 3. make ### Expected Behavior _No response_ ### Specify OS Version FreeBSD 14.3-RELEASE ### CPU amd ryzen ### GPU nvidia 1060 ### Amount of RAM in GB 32
kerem closed this issue 2026-02-27 21:09:52 +03:00
Author
Owner

@red-prig commented on GitHub (Sep 25, 2025):

As far as I know, FreeBSD is not supported by the project. You can send us a pull request with corrections.

<!-- gh-comment-id:3332647463 --> @red-prig commented on GitHub (Sep 25, 2025): As far as I know, FreeBSD is not supported by the project. You can send us a pull request with corrections.
Author
Owner

@Martinfx commented on GitHub (Sep 25, 2025):

As far as I know, FreeBSD is not supported by the project. You can send us a pull request with corrections.

Yes but this is code shadps4 not specific code for freebsd

<!-- gh-comment-id:3332656005 --> @Martinfx commented on GitHub (Sep 25, 2025): > As far as I know, FreeBSD is not supported by the project. You can send us a pull request with corrections. Yes but this is code shadps4 not specific code for freebsd
Author
Owner

@red-prig commented on GitHub (Sep 25, 2025):

If the problem is only reproduced on FreeBSD, I would say that FreeBSD's declarations are to blame.

<!-- gh-comment-id:3332661484 --> @red-prig commented on GitHub (Sep 25, 2025): If the problem is only reproduced on FreeBSD, I would say that FreeBSD's declarations are to blame.
Author
Owner

@Martinfx commented on GitHub (Sep 25, 2025):

If the problem is only reproduced on FreeBSD, I would say that FreeBSD's declarations are to blame.

Did you test compile Shadps4 with Clang?

<!-- gh-comment-id:3332670487 --> @Martinfx commented on GitHub (Sep 25, 2025): > If the problem is only reproduced on FreeBSD, I would say that FreeBSD's declarations are to blame. Did you test compile Shadps4 with Clang?
Author
Owner

@squidbus commented on GitHub (Sep 25, 2025):

Did you test compile Shadps4 with Clang?

Our GitHub Actions CI compiles every commit on Windows, Linux, and macOS with clang, and Linux with gcc.

<!-- gh-comment-id:3332786217 --> @squidbus commented on GitHub (Sep 25, 2025): > Did you test compile Shadps4 with Clang? Our GitHub Actions CI compiles every commit on Windows, Linux, and macOS with clang, and Linux with gcc.
Author
Owner

@Martinfx commented on GitHub (Sep 27, 2025):

I fixed the problem with standart C++26 and llvm21

<!-- gh-comment-id:3341331853 --> @Martinfx commented on GitHub (Sep 27, 2025): I fixed the problem with standart C++26 and llvm21
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1086
No description provided.