A client wanted to have all photos on iMac, iPhone & iPad. Easy peasy, right? Not so much.
Of course, the first thing that needs to happen is all devices must be signed into iCloud using the same Apple ID. Once that was confirmed, we turned on iCloud Photo Library on the iPad & iPhone. Then let it sit for a while. Checking both iOS devices and logging into iCloud from the Mac showed the same number of photos in all three places.
Next, opened System Preferences on the iMac and again confirmed it was using the same Apple ID and confirmed the iCloud System Preference was set for iCloud Photo Library (see image, below).

So far, so good. Opened the Photos app on the iMac to insure iCloud Photo Library was turned on there, as well. (Open Photos. From the Photos menu, choose Preferences, then the iCloud tab. Insure iCloud Photo Library is checked.)

At this point you should see a progress bar and as you follow along, Photos should begin adding & uploading photos to iCloud Photo Library. And, there’s the rub. Photos would get to the point where it appeared to be adding photos to iCloud Photo Library but nothing would happen. The counts for photos on iCloud & the iOS devices remains the same and nothing happens. Nothing. Nada. Zilch.
it was time to start searching for answers. Google exposed this problem over and over with no real solutions. After many hours of searching & reading posts this one provided the best clue: https://tidbits.com/2018/01/25/bad-apple-1-icloud-photo-library-re-uploading/. A short ways down the page, this bullet jumped out: Repairing the Photos library to fix missing or incorrect thumbnails.
I followed the link to “Repairing the Photos library” (above), then quit the Photos app and launched it again holding both the Command & Option keys while clicking the Photos icon in the Dock. What shows next is this:

Clicking the Repair button, good things happen as the Photos Library is repaired. Time to do so will of course depend on the number of photos in the Library. (We only had about 3,200 so it was pretty quick.)
After the repair, we had to go back into Photos preferences and re-check the box to connect to iCloud Photo Library. Once we did that, the magic happened and Photos on the iMac were added to iCloud Photo Library and the iPhone & iPad received all the photos which had only been on the iMac. YMMV (Your Mileage May Vary).
You can find other tips by going to the blog homepage. You can find iHelp’s main offerings, here.
Thanks so much for posting this and leaving it up so long. I’ve been trying to get a library to sync for months and this is only thing that worked (I tried several other things)